PowerShell Core 6.0 Released As GA

On Friday Microsoft PowerShell team announced the official release of PowerShell Core 6.0 after almost two years In the making.

PowerShell core 6.0

An open source and cross-platform scripting and automation tool for Windows, Linux and MacOS based on .NET Core framework.

Install

Note: When Installing PS 6 there Is no need to uninstall PS 5, both version will work side by side without breaking one another.

PowerShell Core 6.0 Is available for download from the link below:

https://github.com/PowerShell/PowerShell/releases

I’ll use the 64Bit version and Install It on my Windows 10 machine.

Below you can see the Installation wizard

Docker

To Install PowerShell 6 on Docker I’ll the command below to download the latest Image running on Nano Server.

docker pull microsoft/powershell:nanoserver

How To use PowerShell Core 6.0

The main change you will notice with PowerShell Core 6.0 Is that the start command is different.

To start PowerShell Core 6.0 we need to use the command:

Pwsh.exe

To check the Installed edition type I run:

$PSVersionTable.PSEdition

To check the build number version

$PSVersionTable.PSVersion

The modules that come with PS 6 Core are:

  • CimCmdlets
  • Microsoft.PowerShell.Archive
  • Microsoft.PowerShell.Diagnostics
  • Microsoft.PowerShell.Host
  • Microsoft.PowerShell.Management
  • Microsoft.PowerShell.Security
  • Microsoft.PowerShell.Utility
  • Microsoft.WSMan.Management
  • PackageManagement
  • PowerShellGet
  • PSDesiredStateConfiguration
  • PSDiagnostics
  • PSReadLine

To view them and their commands I run

Get-Command -Module cimcmdlets

New Commands

Powershell 6.0 comes with a very cool cmdlet that provides uptime Information of the machine.

Get-uptime


Posted

in

by