PowerShell Basics. o PowerShell is a great way to manipulate server and/or workstation components o It’s geared toward system administrators by creating.

Slides:



Advertisements
Similar presentations
Overview and Demonstration of declarative workflows in SharePoint using Microsoft SharePoint Designer 2007 Kevin Hughes MCT, MCITP, MCSA, MCTS, MCP, Network+,
Advertisements

Microsoft PowerShell Tom Roeder CS fa. Motivation.NET as a platform shell web server database access Native access to resources eaiser to manage.
Many kinds of clients and servers This work is licensed under a Creative Commons Attribution-Noncommercial- Share Alike 3.0 License. Skills: none IT concepts:
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Great people, great experience, great passion Administering SharePoint with Windows PowerShell Go Beyond the Management Shell with SharePoint and Windows.
Basic.  Powershell scripts are flat text files that end with “.ps1” (e.g. myscript.ps1)  Similar to other scripting languages, whatever you can do on.
Interpret Application Specifications
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Module 6 Windows 2000 Professional 6.1 Installation 6.2 Administration/User Interface 6.3 User Accounts 6.4 Managing the File System 6.5 Services.
Microsoft virtual machine converter
File sharing. Connect the two win 7 systems with LAN card Open the network.
PowerShell: Drink the Kool-Aid!. Who we are…..Who we are…..
#BSidesCMH PowerShell Copyright (C) 2014 ColumbusBSides. PowerShell: Drink the Kool-Aid.
11 SYSTEMS ADMINISTRATION AND TERMINAL SERVICES Chapter 12.
Adding a Module The Import-Module cmdlet  Can be used to load any external module into PowerShell.  Uses the following syntax to add the ActiveDirectory.
Week #10 Objectives: Remote Access and Mobile Computing Configure Mobile Computer and Device Settings Configure Remote Desktop and Remote Assistance for.
Working with Applications Lesson 7. Objectives Administer Internet Explorer Secure Internet Explorer Configure Application Compatibility Configure Application.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
1 Objectives Windows Firewalls with Advanced Security Bit-Lock Update and maintain your clients using Windows Server Update Service Microsoft Baseline.
Presenters: Winfred Wangeci Jignash Reddy.  It is Microsoft's new task-based command- line shell and scripting language designed especially for system.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring, Managing, and Troubleshooting Resource Access.
MS WINDOWS POWER SHELL CSE 535 Operating Systems.
| | Tel: | | Computer Training & Personal Development Microsoft Office PowerPoint 2007 Expert.
Windows PowerShell Deep Dive 1 Morgan Simonsen Ementor.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Microsoft ® Official Course Module XA Using Windows PowerShell ®
SharePoint 2010 Development Environment A Guide to Setup SharePoint 2010 Development Environment on Windows 7 Machine.
Module 8 Configuring Mobile Computing and Remote Access in Windows® 7.
Appendix A Starting Out with Windows PowerShell™ 2.0.
Virtual techdays INDIA │ august 2010 INVENTORY YOUR NETWORK AND CLIENTS WITH POWERSHELL Govindaraj Rangan │ Technology Strategist, Microsoft Corporation.
Troubleshooting Windows Vista Security Chapter 4.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
December, 21, 2010 Bartek Bielawski Sr IT Site Services Specialist Warsaw, Poland.
Good Morning and Thank You!.  Have some Fun!  Learn at least one thing new!  Make myself available to you So please …  Ask questions and enjoy!
Reinsel Kuntz Lesher, LLP.  Outline Overview  netstat -an (-ano will give the PID)  ftp  bin  mget  mput  telnet  telnet bobm.us 25  helo  mail.
Module 4 : Installation Jong S. Bok
POWERSHELL SHENANIGANS KIERAN JACOBSEN HP ENTERPRISE SERVICES.
1 Objectives Windows Firewalls with Advanced Security Bit-Lock Update and maintain your clients using Windows Server Update Service Microsoft Baseline.
Module 3 Configuring File Access and Printers on Windows 7 Clients.
Ed Wilson, MCSE, MCSD Microsoft Scripting Guy Microsoft Session Code: WCL314.
Virtual techdays INDIA │ 9-11 February 2011 Monitoring and managing remote Windows 7 desktops with Windows PowerShell Ravikanth C │ Dell Inc.
Corey Hynes HynesITe, Inc Session Code: SRV317 Objectives Let you walk out of here, being able to run a script against an OU of computers, to make some.
Windows PowerShell Introduction 1 Morgan Simonsen Ementor.
 An alias is an alternative name assigned to a Cmdlet.  Aliases allow users to quickly interact with the shell.  The Cmdlet get-alias is.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
CIS 1402: Intro to CIS Tom Gustafson. Facts About PowerShell PowerShell is Microsoft’s command-line interface that provides scripting and management capability.
POWERSHELL BASICS. BACKGROUND  Powershell is a task automation and scripting language based off the.NET framework  It provides the user full access.
 It is Microsoft's new task-based command- line shell and scripting language designed especially for system administration.  It helps Information Technology.
Windows PowerShell. What is Windows PowerShell? A command-line interface (CLI) A new way of developing Windows and other products to be more manageable.
Microsoft ® Official Course Module 6 Managing Software Distribution and Deployment by Using Packages and Programs.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Getting Started with Unix Naomi Altman. Connecting to a PSU Linux Cluster click on SSH click on "quick connect" Host Name: lxcluster.tlt.psu.edu User.
 Version 1.0[edit]edit  Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server 2003,
Ravikanth C.
PowerShell 5 & Windows 10. What are we covering today? What is PowerShell? Why is PowerShell important? Some simple demos on Windows 10.
How to convert a Demo to Multi-user
BASIC PROGRAMMING C SCP1103 (02)
Office PowerShell administration
PowerShell 2.0 Remoting Ravikanth C.
BASIC PROGRAMMING C SCP1103 (02)
FTP Lecture supp.
SQL Server & PowerShell
Getting Started with the Data ONTAP PowerShell Toolkit
Unit 8 NT1330 Client-Server Networking II Date: 8/2/2016
PowerShell Best Practices for SQL DBA’s
Presentation transcript:

PowerShell Basics

o PowerShell is a great way to manipulate server and/or workstation components o It’s geared toward system administrators by creating a more simplified syntax base o PowerShell is more secure than running vbscripts o Quick analysis of various computer specs

o Microsoft.NET Framework v2.0 or later o Windows XP/Server 2003 or later o The PowerShell install file (Download)Download o Windows Management Framework (Includes) o Windows Remote Management o Windows PowerShell 2.0 o Background Intelligent Transfer Service (BITS) 4.0

o You can use commands that you are familiar with such as CD, PING, IPCONFIG or DIR o There are also some Unix commands that can be used such as LS or MAN (these commands are aliases to the actual PowerShell commands) o Get-Alias will list the preloaded Alias’s and will show you what Cmdlet they are mapped to

o The majority of the PowerShell functionality comes from Cmdlet’s o Always in Verb-Noun format and never plural (Get-WmiObject or Get-Process) o Cmdlet’s return objects not text o Retrieve list of Cmdlet’s (Get-Command) o Can tab complete

o One of the time savers in PowerShell is giving the user the ability to pipe commands together o Ex. Get-process | select ProcessName, ID | Sort ProcessName | FL

o PowerShell scripts differ from most scripts o PowerShell scripts end in.ps1 and have to be run inside a PowerShell window o Double clicking a PowerShell script will open the script in notepad o Scripts must also be run in this format

o Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode. o AllSigned – Only scripts signed by a trusted publisher can be run. o RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run. o Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

o PowerShell can tap in to the WMI classes of another computer as well your own, given you are using administrative credentials o Ex. Get-WmiObject Win32_Product will list all of the Microsoft installed products on your machine (products installed by Windows Installer)

o You can use the runas command in the ‘start’ menu to run the PowerShell console as administrator o There is a Cmdlet called Get-Credential which can store administrative credentials in a variable o Can’t be used to authenticate to local machine

o Because WMI calls utilize the RPC protocol, the Windows Firewall must be turned off or Remote Administration must be enabled o The RPC protocol uses random ports

o Pull computer serial number o Gwmi Win32_Bios | select SerialNumber o Reboot a machine o (Gwmi win32_OperatingSystem –comp | server).reboot() o Gather Logical Disk Space information o Gwmi Win32_LogicalDisk o Show running processes o Gwmi Win32_Process

o Variables are defined by the two following ways [type] $variable = x or just $variable = x o To display a variable you would just type $variable o Ex. To store the installed products on your machine o $Product = gwmi Win32_Product

o If you displayed the contents of $Product, it would display the entire list of products that it pulled o To individually go through each installed product you would need to use a ForEach statement

o Server 2008 R2 o Window 7 o Exchange 2007/2010 o System Center 2008 Suite o SQL 2008/2008 R2 o SharePoint 2010

o o o o r/topics/winpsh/convert/default.mspx r/topics/winpsh/convert/default.mspx o Site Converts VB code to PowerShell Code

o $NIC = Get-WMIObject Win32_NetworkAdapterConfiguration | where{$_.IPEnabled -eq "TRUE“} o $NIC.EnableStatic(" ", " ") o $NIC.SetGateways(" ") o $NIC.SetDNSServerSearchOrder(“ ”, “ ”) o $NIC.SetDynamicDNSRegistration("FALSE")

o Gwmi win32_process | select name | sort name o (Gwmi win32_process | where {$_.name – (match “processname.exe”}).terminate(1)

o gwmi win32_terminalservicesetting -comp computername).setallowtsconnections(1)