What is PowerShell

PowerShell is a command-line shell and a scripting language. You can use PowerShell for script automation, run batches of commands, control resources in the Cloud, etc. Nowadays there’s PowerShell Core which works on Linux, macOS, and Windows OS. If you need more information, you can check out Introduction to PowerShell on microsoft.com for some great learning.

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: For more on this read – How to check the 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.

Read: How to install PowerShell 7.0 on Windows 10.

Windows PowerShell features

Windows PowerShell 3.0 introduced the following new functionality:

Windows PowerShell workflowsCIM cmdletsCmdlets over objects (CDXML)Windows PowerShell Web AccessModule automatic loadingUpdatable HelpRobust and disconnected sessionsScheduled jobs

Windows PowerShell 4.0 brought:

Desired State Configuration (DSC)Windows PowerShell Web Access improvementsWorkflow enhancementsNew features for Windows PowerShell Web ServicesSave-Help

Windows PowerShell 5.0, which  included in Windows 10 introduces the following functionality:

Classes can be defined in functionalityDSC enhancementsTranscriptions available in all hostsMajor enhancements to debugging, including the ability to debug Windows PowerShell jobsNetwork switch moduleOneGet for managing software packagesPowerShellGet for managing Windows PowerShell modules through OneGetPerformance gain when using COM objects

Windows PowerShell 6.0 is cross-platform (Windows, macOS, and Linux), open-source, and built for heterogeneous environments and the hybrid cloud.

Moved from .NET Framework to .NET CoreUses .NET Core 2.0 as its runtime.Enables PowerShell Core to work on multiple platforms (Windows, macOS, and Linux).The APIs shared between .NET Core and .NET Framework are defined as part of .NET Standard.

Windows PowerShell 7.0 ships with a lot of new features like:

Pipeline parallelizationNew operatorsConciseView and Get-Error cmdletAutomatic new version notificationsInvoke DSC resources directly from PowerShell 7Compatibility layer.

Read:

Terminal vs PowerShell vs Command Prompt difference explainedWindows PowerShell ISE vs Windows PowerShell.

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 the 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 the 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 the 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 an 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.