Powershell Core – “experimental feature” feature

Since the release of Powershell Core 6.2 at the end of March 2019 there is a huge steering towards using Powershell Core instead of Windows Powershell. To be honest I was considering Powershell Core as a tool for managing Linux machines only, an alternative tool for all existing old school tools.

But “I have never been so wrong in my life”. I watched a talk by Jeffrey Snover @jsnover from the NY Powershell meetup about PowerShell Core 6. 2 and 7. Great talk about Powershell and Microsoft in general. You can view it here. During that talk I found out about “experimental feature” feature.

Right after hearing about it I installed Powershell Core 6.2 on my Windows machine and start playing with those features.

An experimental feature is one where the design is not finalized. The feature is available for users to test and provide feedback. Once an experimental feature is finalized, the design changes become breaking changes. Experimental features aren’t intended to be used in production since the changes are allowed to be breaking.

Excerpt from about_experimental_features

Experimental features are disabled by default. You can enable all of them simply by issuing following command:

Get-ExperimentalFeature | Enable-ExperimentalFeature

Please note that after enabling or disabling Experimental Feature you will need to restart Powershell for changes to take effect.

Get-ExperimentalFeature | Enable-ExperimentalFeature

At the time of writing there are 4 experimental features:

  • PSCommandNotFoundSuggestion – If/when you will mistype cmdlet it will show you hint with similar cmdlets like it always was in unix based shells
  • PSImplicitRemotingBatching – implicit remoting proxy commands to improve performance
  • PSTempDrive – TEMP folder PSDrive
  • PSUseAbbreviationExpansion – tab completion for abbreviated commands

Examles

First of all let’s look into my favorite one AbbreviationExpansion:

For this example I will use Test-Connection cdmlet. I just need to type 3 symbols(shorter than ping o_0) and hit Tab in order to expand it:

Abbreviated
Expanded

And last but not least lets look into typo suggestions :

Command Not Found Suggestion

I strongly suggest to try it yourself and also read the about_experimental_features document for more details and also , familiarize yourself how you can declare you own Experimental Features.

Thanks a lot for reading. Please leave you thoughts and/or comments in the comments section below.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.