Showing posts from March, 2020

Test out PowerShell 7 new features in WSL

Finally, PowerShell 7 is now GA! As a heavy WSL user, I was keen to see how some of its new features will work in WSL1 (Ubuntu 4.4.0-18362-Microsoft). Below are the tests I have done. Installation in WSL Download the binary from Github repo to a local folder /usr/share/powershell sudo wget Untar the file sudo tar xzvf powershell-7.0.0-linux-x64.tar.gz Add path for your shell export PATH=/usr/share/PowerShell:$PATH Reload .bashrc source .bashrc Remove the tar ball sudo rm /usr/share/PowerShell/powershell-7.0.0-linux-x64.tar.gz Run PowerShell 7 by run pwsh Import Windows Modules in WSL Install commonly Vendor released modules like VMware PowerCli Install-Module -Name VMware.PowerCli Install .Net based modules also works fine. Install-Package PrtgApi What about those module require Windows GUI, like Out-GridView? PowerShell 7 on Windows fully support this