Windows 10 Insider Build 17704 missing PowerShell PSReadLine Module

There has been some noise around “Whatever happened to PSReadLine on this build?“. Well, its a very vague comment. And, due to I’ve been working more with PowerShell Core then I’m starting to stop paying attention to Windows PowerShell.

What did happened with Build 17704?

OK!! So, Windows PowerShell in Build 17704 is missing the PSReadLine Module. So, the workaround is simple to download it from the PowerShell Gallery.

Except! That you need version 2.0.0 (not 1.2).

Check the link: https://www.powershellgallery.com/packages/PSReadLine/2.0.0-beta2

This is good thing because you can install and uninstall module when version 2.0.0 final release get published.
You don’t want to use version 1.2.

Installing PSReadLine in Windows PowerShell

The following command will install the 2.0.0-beta2:

Install-Module -Name PSReadLine -AllowPrerelease -Repository PSGallery

I’m hoping this will help!

 

There’s no issues with PowerShell Core and PSReadLine Module!

 

Installing PowerShell Core 6-Preview.3 in Ubuntu 18.04 and CentOS 7

As you may notice, only the deb package for PowerShell 6-Preview.3 is available for installation. So, only when it becomes GA (Generally Available), then we’ll see the repository documentation included for Ubuntu 18.04 and CentOS 7 installation.

But, don’t worry! Below are some undocumented steps for installing PowerShell Core Preview.3 release.

Installing PowerShell Core 6-Preview.3

1. Download PowerShell Core dpkg *deb for Linux Ubuntu 18.04 or the *rpm package for CentOS 7 from the Release page, and look:
https://github.com/PowerShell/PowerShell/releases/tag/v6.1.0-preview.3

2. Then, execute the next two lines because the first one will not complete successfully:

-For Ubuntu 18.04 dpkg *deb package-

sudo dpkg -i powershell-preview_6.1.0-preview.3-1.ubuntu.18.04_amd64.deb
sudo apt-get install -f

-For CentOS-

sudo yum install powershell-preview-6.1.0-preview.3-1.rhel.7.x86_64.rpm

In either Ubuntu and CentoOS, the installation will seems that will complete without any failures. But, when typing pwsh will not work.

Use the following workarounds if you feel is convenient to use.  Please skip to the “Things Are Changing!” and check out “Undocumented Tips” section.

Execute PowerShell Core – Workaround #1

Type the full path, and PowerShell Core will start:

/opt/microsoft/powershell/6-preview/pwsh

But, of course we don’t want to do this every time.

Execute PowerShell Core – Workaround #2

So, let Just add the PowerShell Core path to the user ~/.bashrc file, follow with reloading Bashrc:

echo ‘export PATH=”$PATH:/opt/microsoft/powershell/6-preview”‘ >> ~/.bashrc
source ~/.bashrc

After all this done, now we can start PowerShell Core from the Ubuntu 18.04 terminal.

Things Are Changing!  (Added – 06/14/2018)

Please make sure to read the PowerShell Core v6.1.0-preview.3 Release Notes.  It announce changes to the PowerShell Core executable for both Linux Distro and MacOS. So, although the above workaround mention works, you can just open PowerShell Core Console by typing “pwsh-preview”.

Undocumented Tips  (Added 06/16/2018)

Repo installation is available!

Most important to be aware of these few tips. You won’t find PowerShell 6.1.0-Preview.3 in any repository. But, there is a PowerShell-Preview.

Now, uninstalling PowerShell Core if you got the PowerShell 6.1.0-Preview.2 installed, then it need to:

  • Ubuntu

sudo apt remove powershell

  • CentOS 7

sudo yum remove powershell

But, in the case you need to remove or reinstall PowerShell Core Preview.3 in either Ubuntu and CentOS then use:

  • Ubuntu 

sudo apt remove powershell-preview

  • CentOS 7

sudo yum remove powershell-preview

Now, to install PowerShell Core Preview.3, beside been able to use either the dpkg *deb package for Ubuntu or the *rpm package to install it, you can use the following command:

  • Ubuntu

sudo apt install powershell-preview

  • CentOS 7

sudo yum install powershell-preview

It works!

These instruction was not documented at the time of the release of PowerShell Core Preview.3.

Thanks for the PowerShell Core Github Community for all the information available about PowerShell Core installation. I know this documentation will be eventually updated in due time.

 

Be Bold! Learn PowerShell Core!