Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Sunday, April 17, 2011

PowerShell Basics

The below summary has been created from Microsoft Webcast PowerShell: Learn it before its an emergency

Windows PowerShell
PowerShell (PS) is installed on Windows 7 by default. PS console is also available on Windows Server 2008 R2. Script editor needs to be added as a feature. For Windows Vista, XP you can use Windows Update to get it. Once installed, you can find it under Start>All Programs>Accessories>Windows PowerShell.
Here is an article on how to install on Windows XP.

By default scripting is turned off in PS i.e. as soon PS is installed, you can't run scripts. In order to turn it on you need to enable the group policy.

Easy commands:
dir
cls
md
rd
get-process
get-service
get-eventlog
get-lost?
get-help
notepad


What-If option shows you what you are about to do


Note | option works just like Unix/Linux - you can send output of one command to another.

Applying PowerShell Command filters using where clause - where {$_.status -eq 'running'}



Getting help using get-help


Get-process can be run on a remote computer!


Version of PowerShell

Udemy