Rob van der Woude's Scripting Pages

Getting Started with PowerShell

Microsoft's new scripting shell, formerly known as Monad or MSH

Operating System:
PowerShell 2.0 is installed by default on Windows 7 and Server 2008 R2, and can be downloaded for Windows XP SP3, Windows Server 2003 SP2, Windows Vista SP1 and Windows Server 2008 SP2.
PowerShell 4.0 is installed by default on Windows 8.1, and can be downloaded for Windows 7 and Windows 8.
PowerShell 5.1 is installed by default on Windows 10, and can be downloaded for Windows 7, 8.1, Server 2008 R2, Server 2012 and Server 2012 R2.
PowerShell 6.0 can also be installed on Linux and MacOS.
For PowerShell 4.0 on Windows 7 and 8, Microsoft .NET Framework 4.5 is required.
For PowerShell 5.1 on Windows 7 and Server 2008 R2, Microsoft .NET Framework 4.5.2 is required.
PowerShell won't run on Windows Server 2008 Core, as the Windows Server 2008 Core configuration doesn't support any .NET Framework version.
Interpreter:
The interpreter is the "engine" that executes scripts.
It is installed by default on Windows 7 and Server 2008 R2 and later.
It can be downloaded for Windows XP SP3, Windows Server 2003 SP2, Windows Vista SP1 and Windows Server 2008 SP2 (you may need to uninstall older versions of PowerShell first).
To use PowerShell on Linux or MacOS it must be downloaded and installed first.
PowerShell 5 currently (January 2021) is the default version installed on Windows 10, to get PowerShell 7 download it at github.
Security:
If you want to create and run your own PowerShell scripts on Windows, you may want to digitally sign your scripts.
To create your own so called "self-signed" certificate you'll need makecert.exe that comes with the .NET Framework 2.0 SDK.
To learn more about signing your scripts, start a PowerShell shell, type Get-Help about_signing and read this text carefully.
Then type Get-Help Set-AuthenticodeSignature -detailed and read this text just as carefully.
In PowerShell Plus creating a "self-signed" certificate takes only a couple of mouse clicks.
Development software:
As of version 2.0 for Windows, PowerShell comes with its own PowerShell Integrated Scripting Environment (ISE).
Several "third party" IDEs and code generators are available for PowerShell too.
For Linux and MacOS, Visual Studio Code is recommended.
Help files:
Most up-to-date, right now, are Microsoft's PowerShell pages on MSDN and TechNet.
Much of the help available on the web applies to PowerShell 1.0, but it is still valid.
Read the Windows PowerShell Owner's Manual.
Other help on the web:
Books:
I compiled a short list of books on PowerShell.
PowerShell webcasts by Don Jones and Jeffrey Snover:
Samples:
Start by examining sample PowerShell scripts and exploring other PowerShell related sites.
Newsgroups:

page last modified: 2021-01-12; loaded in 0.0018 seconds