Chapter 2. Getting Started

Installing PowerShell

Installing PowerShell is as simple as installing any other application. Even better, it comes preinstalled with Windows 7, Windows Server 2008 R2, Windows 8, and Windows Server 2012. PowerShell is also available for previous versions of Windows XP, 2003, and Vista.

As noted, PowerShell v3 comes preinstalled with Windows 8 (and as I am writing this, there is a RC release for Windows 7; you can download it at http://bit.ly/MdfXPo). New cmdlets and language features are abundant in this more robust version, all designed to make you more productive and lower the barrier of entry to using PowerShell.

If you are running an older Microsoft Windows OS, I encourage you to update that; however, PowerShell v2 can run on these boxes. You can get v2 at http://bit.ly/2QfKYT; make sure to download the right PowerShell for your OS and architecture.

Note

While there is no PowerShell version for UNIX, Linux, or Mac, Microsoft did license the PowerShell language under the Community Promise (http://bit.ly/dLIHJ8). We’ll see if any developers pick up from here and implement PowerShell on non-Windows boxes.

Checking the PowerShell Version

Depending on your Windows OS, you can navigate to PowerShell in many ways. First, get to the command prompt and type:

PS C:\> $PSVersionTable Name Value ---- ----- WSManStackVersion 3.0 PSCompatibleVersions {1.0, 2.0, 3.0} SerializationVersion 1.1.0.1 BuildVersion 6.2.8158.0 PSVersion 3.0 CLRVersion 4.0.30319.239 PSRemotingProtocolVersion ...

Get Windows PowerShell for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.