Getting started with Windows 10 PowerShell v5.0 Preview

As we already know with the new version of Windows 10 comes PowerShell Version 5.0 PREVIEW loaded with more enhancements and new Cmdlets.  It also come with the PowerShell ISE (Integrated Scripting Environment) which has been enhanced.  But, how can we get started?

The same procedure needed to get started in previous PowerShell versions still applies:

1. Add PowerShell on your “Start Menu” or just run it from the Windows System menu group.

ExecutePowerShellasAdiministrator

2. Open either of the PowerShell Console or the shell within the ISE then set the “ExecutionPolicy“.  Preferably executing “as Administrator“:

[sourcecode language=”powershell”]
Set-ExecutionPolicy -ExecutionPoilicy RemoteSigned

[/sourcecode]

ExecutePowerShellExecutionPolicy

3. To start the Windows PowerShell ISE editor you will need to execute the “ISE” command from the PowerShell console.
Then when is open, you can do a right-click on the ISE task bar and do “Pin to Taskbar“.  ISE can’t be pinned to the “Start Menu” yet.

ExecutePowerShellISE

Although, without setting the ExecutionPolicy, you can still execute single command lines. But, failure to do so will cause a script file not to execute.

Next, If you don’t have the time to buy a book then take a look at the PowerShell Help “About_*” topics.   There are a additional step that update your PowerShell documentation on your machine.  Of course, Internet connection is required.

4. Open the PowerShell Console or the shell in ISE to run the following command “Update-Help”, and again preferably executing “as Administrator”:

[sourcecode language=”powershell”]
Update-Help

[/sourcecode]

ExecutePowerShellISE_02

ExecutePowerShellISE_01

After you have updated all your PowerShell Version 5.0 documentation try usign the following command lines to list and select any of the existing help “About_*” topics:

[sourcecode language=”powershell”]
[Array] $s = (Get-Help About_* | Select Name) | out-gridview -PassThru;
foreach($i in $s){ Get-Help $i.Name -ShowWindow;};

[/sourcecode]

PowerShellColectingHelpTopic_01

PowerShellColectingHelpTopic_02

Basically, these two commands will help in listing all help About_* topics and using ‘Out-Gridview’ cmdlet with the  -Passthru’ parameter you can select multiple topics to read.  Just press the Ctrl key when selecting the topics.

I’ve create a help module if you want to give it a try to assist in your PowerShell journey.  Check this link:
https://gallery.technet.microsoft.com/DiscoverPowerShell-Module-1fbe9a5e

More Discover PowerShell – How about Help with PowerShell Variables?

4. When loading PowerShell modules the following folder “C:\Users\…\Documents\WindowsPowerShell\Modules” doesn’t exist.  So you will need to go to the User document folder create this folder.

This folder is where you install all you customs and/or add any existing on PowerShell modules (including the ones for ISE).  Below is a list of suggested PowerShell Add-on modules you may want to look at:

Make sure to read the ReadMe files and verify that the module(s) can run on this version of PowerShell.

Now, at this point, you’ll be ready to start using PowerShell v5.0.