Skip to main content

Powershell Core - pwsh

Powershell Core on RHEL

PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models.

It includes a command-line shell, an associated scripting language and a framework for processing cmdlets.

Powershell is the SHELL that give you POWER. Use IT or lose IT!

Keep updating

Microsoft announced PowerShell 7.0 on March 4th, 2020.

Powershell Core 7.0
Powershell Core 7.0 - $PSVersionTable

Powershell Core on Windows

Powershell Core on Windows

Powershell Core on Windows 10

Install PowerShell Core using dotnet (.NET Core SDK)

C:\Users\tuyen>dotnet tool install --global powershell
You can invoke the tool using the following command: pwsh
Tool 'powershell' (version '6.2.3') was successfully installed.

C:\Users\tuyen>pwsh
PowerShell 6.2.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS C:\Users\tuyen>

Update PowerShell Core using dotnet (.NET Core SDK)

PowerShell 6.2.0
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS C:\Users\Tuyen> dotnet tool update --global Powershell
You can invoke the tool using the following command: pwsh
Tool 'powershell' (version '7.0.0') was successfully installed.
PS C:\Users\Tuyen>

Install PowerShell Core using snap on Fedora Workstation

[tuyen@g73jh ~]$ sudo snap install powershell --classic
[sudo] password for tuyen:
powershell 7.0.3 from Microsoft PowerShell✓ installed
[tuyen@g73jh ~]$ pwsh
PowerShell 7.0.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

PS /var/log>

Install Powershell Core on Kali Linux

root@X220:~# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2020.4
Codename:       kali-rolling
root@X220:~#
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt update
apt install powershell

Related blog posts

RHEL: Install Powershell Core

Popular posts from this blog

Linux command: top

NAME        top - display Linux processes SYNOPSIS        top -hv|-bcHiOSs -d secs -n max -u|U user -p pid -o fld -w [cols]        The traditional switches `-' and whitespace are optional. DESCRIPTION        The  top program provides a dynamic real-time view of a running system.  It can display        system summary information as well as a list of processes or  threads  currently  being        managed  by  the  Linux  kernel.  The types of system summary information shown and the        types, order and size of information displayed for processes are all user  configurable        and that configuration can be made persistent across restarts.        The  program  provides a limited interactive interface for process manipulation ...

Linux command: printenv

printenv - print all or part of environment NAME        printenv - print all or part of environment SYNOPSIS        printenv [OPTION]... [VARIABLE]... DESCRIPTION        Print  the  values  of the specified environment VARIABLE(s).  If no VARIABLE is speci‐        fied, print name and value pairs for them all.        -0, --null               end each output line with NUL, not newline        --help display this help and exit        --version               output version information and exit        NOTE: your shell may have its own version of printenv,  which  usually  supersedes  the        version  described  here.  Please refer to your shell's documentation for d...