Getting Started with PowerShell

  • Open a CMD shell, and issue this command. (It makes me FURIOUS that this is not mentioned immediately in most documentation I’ve read.) You NEED THIS to run just about any powershell scripts (.PS1 files).

powershell set-executionpolicy remotesigned

  • Get the powershell version information:
c:\temp> powershell $psversiontable
 Name                           Value
 ----                           -----
 PSVersion                      3.0
 WSManStackVersion              3.0
 SerializationVersion           1.1.0.1
 CLRVersion                     4.0.30319.18033
 BuildVersion                   6.2.9200.16434
 PSCompatibleVersions           {1.0, 2.0, 3.0}
 PSRemotingProtocolVersion      2.2
  • Start a powershell console windows and update the latest help. Do this periodically.
c:\temp> powershell
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
PS c:\temp> update-help
  • For a good time, open the powershell Integrated Scripting Environment. This is very helpful. That is, it makes it even easier to get-help.
c:\temp> powershell_ise