Xah Lee, 2009-07, 2010-01-30
PowerShell is bundled with Windows 7 (released in 2009). If your Windows does not come with PowerShell, you can download PowerShell from Microsoft Technet at Source. Make sure you are downloading PowerShell version 2 or later.
To start PowerShell, press 【Win+r】 then type “powershell”.
To find out your PowerShell version, type “$PSVersionTable” while in PowerShell. For example, here's my output:
PS C:\Windows\System32\WindowsPowerShell\v1.0> $PSVersionTable
Name Value
---- -----
CLRVersion 2.0.50727.4200
BuildVersion 6.0.6002.18139
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1
Note: the folder path says “v1.0”, but that is not the real version number.
PowerShell has extensive built-in help system. Just type “help” and read thru it.
#Some common help forms: help dir # display a short doc for “dir” help dir -examples # show examples of using “dir” help dir -full # display the complete doc, including examples help *r # display all commands ending in r help help # display doc for help itself
Take at least 15 minutes to get familiar with help, its content structure, formats, because you will be using it a lot.
You might want to download the graphical help file, version 2, at: microsoft.com. The graphical help lets you read PowerShell documents like a web browser.
PowerShell supports name completion, by the Tab key. So, you can press the tab key and it will complete your typings. Press tab again to see the next choice.
The name completion can be applied to options as well. For example, type “help dir -e” then Tab.
blog comments powered by Disqus