# Download the powershell '.tar.gz' archive curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v6.2.7/powershell-6.2.7-linux-x64.tar.gz # Create the target folder where powershell will be placed sudo mkdir -p /opt/microsoft/powershell/6 # Expand powershell to the target folder sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/6 # Set execute permissions sudo chmod +x /opt/microsoft/powershell/6/pwsh # Create the symbolic link that points to pwsh sudo ln -s /opt/microsoft/powershell/6/pwsh /usr/bin/pwsh6 # install NTLM dependency sudo apt install gss-ntlmssp # Start PowerShell sudo pwsh6 # Install WSMan (v2.2.0 won't work. We should install 2.1.0) Install-Module -Name PSWSMan -RequiredVersion 2.1.0 Install-WSMan # Restart your PowerShell session to enable it in PowerShell exit sudo pwsh6