Windows 10 ships with Windows PowerShell 5.0. Windows 8.1 comes installed with Windows PowerShell 4.0. The new version hosts many new features designed to make its language simpler, easier to use, and to avoid common errors. If you are using an earlier version of PowerShell on your Windows operating system, migrating to this version of Windows PowerShell will bring many benefits. It not only lets the system administrators manage every aspect of Windows Server OS, but also offers control over SQL, Exchange and Lync-based servers.
Which version of PowerShell I am running
To find out which version of PowerShell you are using, do the following.
Open a PowerShell window and type any one of the following commands and hit Enter:
- get-host|Select-Object version
For more on this read – How to check PowerShell version in Windows 10.
Windows Server 2012, Windows Server 2008 R2, Windows Server 2008 SP2, Windows 8 and Windows 7 with SP1 users will be able to use Windows PowerShell 3.0.
Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows 8.1 and Windows 7 with SP1 users will be able to use Windows PowerShell 4.0.
Windows 10 ships with Windows PowerShell 5.0.
Windows PowerShell features
Windows PowerShell 3.0 introduced the following new functionality:
- Windows PowerShell workflows
- CIM cmdlets
- Cmdlets over objects (CDXML)
- Windows PowerShell Web Access
- Module automatic loading
- Updatable Help
- Robust and disconnected sessions
- Scheduled jobs
Windows PowerShell 4.0 brought:
- Desired State Configuration (DSC)
- Windows PowerShell Web Access improvements
- Workflow enhancements
- New features for Windows PowerShell Web Services
Windows PowerShell 5.0, which included in Windows 10 introduces the following functionality:
- Classes can be defined in functionality
- DSC enhancements
- Transcriptions available in all hosts
- Major enhancements to debugging, including the ability to debug Windows PowerShell jobs
- Network switch module
- OneGet for managing software packages
- PowerShellGet for managing Windows PowerShell modules through OneGet
- Performance gain when using COM objects
TechNet Library has nicely explained these features in detail. Let us have a look at some of them in brief.
Windows PowerShell Workflow: The capability brings the power of Windows Workflow Foundation to Windows PowerShell. You can write workflows in XAML or in the Windows PowerShell language and run them just as you would run a cmdlet.
Improvements to Existing Core Cmdlets and Providers: Windows PowerShell 3.0 includes new features for existing cmdlets including the simplified syntax, and new parameters for the cmdlets like – Computer cmdlets, CSV cmdlets, Get-ChildItem, Get-Command, Get-Content, Get-History, Measure-Object, Security cmdlets, Select-Object, Select-String, Split-Path, Start-Proces, Tee-Object, Test-Connection and .Add-Member
Remote module import and discovery: Windows PowerShell 3.0 extends module discovery Importing, and implicit remoting capabilities on remote computers.
The Module cmdlets: Has capability to import modules on remote computers to the local computer by using Windows PowerShell remoting.
New CIM session support: Gives permission to use CIM and WMI to manage non-Windows computers by importing commands to the local computer that run implicitly on the remote computer.
The Auto-complete feature: Saves typing time, and reduces your typos.
PowerShell 3.0 Intellisense: Underlines the error you make in red and suggests corrections when you hover the mouse pointer over wavy line.
Update-Help cmdlet: This cures many small errors, or annoying typos, in the built-in documentation.
Enhanced Console Host Experience: Changes underlying the Windows PowerShell console host program are enabled in PowerShell 3.0 by default. In addition, the new “Run with PowerShell” option in File Explorer lets you run scripts in a unrestricted session just by right-clicking.
RunAs and Shared Host Support: The RunAs feature, designed for Windows PowerShell Workflow, lets users of a session configuration create sessions that run with the permission of a shared user account. The SharedHost feature on the other hand, allows multiple users on multiple computers to connect to a workflow session concurrently and track the progress of a workflow carefully.
Special Character Handling Improvements: A quick lap around Windows PowerShell 3.0 shows to improve the ability of the program to interpret and correctly handle special characters, the LiteralPath parameter, which handles special characters in paths, is valid on almost all cmdlets that have a Path parameter, including the new Update-Help and Save-Help cmdlets.
Using PowerShell, you can generate a list of Windows Services, generate a list of Disabled Features, Export and Backup Device Drivers, Find System Uptime, Update Windows Defender definitions, list Drives, get Installed Driver list, Uninstall Windows Store Apps, Add item to Desktop Context Menu, Create System Image, download a file and more.
You might also find these links useful:
- Windows PowerShell Guides from Microsoft
- Windows PowerShell Step By Step Guide From Microsoft
- Windows PowerShell Scripting Guide from Microsoft.