PowerShell Quickstart

Q: What version of PowerShell should I use?

A: Try to use the latest version. Here’s what is shipped with the OS.

Operating SystemShipped Version
Windows XP SP2PowerShell 1.0
Windows Server 2003PowerShell 1.0
Windows VistaPowerShell 1.0
Windows 7PowerShell 2.0
Windows Server 2008 R2PowerShell 2.0
Windows 8PowerShell 3.0
Windows Server 2012PowerShell 3.0
Windows 8.1PowerShell 4.0
Windows Server 2012 R2PowerShell 4.0
— not shipped with OS yet —PowerShell 5.0

Powershell 5.0 is available via the Windows Management Framework for Windows 7 and above

Q: What version am I running?

A: Start powershell and use the $PSVersionTable command:

Z:\> $PSVersionTable

Name                           Value  
----                           -----
PSVersion                      4.0  
WSManStackVersion              3.0  
SerializationVersion           1.1.0.1  
CLRVersion                     4.0.30319.42000  
BuildVersion                   6.3.9600.17400  
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}  
PSRemotingProtocolVersion      2.2

Q: How do I relax security, so that PowerShell is at least usable.

Run this. You only need to do this once.

Set-ExecutionPolicy RemoteSigned  

Q: How do I install post-git, so I get those fancy prompts that tell me what git branch I am working in?

Run the following 2 commands:

(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex 

install-module posh-git  

Resources

This article was inspired by the article Better Git with PowerShell from by @haacked

Scroll to Top