Installing and Updating PowerShell

Installing and Updating PowerShell

Installing PowerShell

·        Already installed on Windows 7 and server 2008 and every release after that.


Finding PowerShell

For Windows 10 click the lower left corner called the search box and type Windows PowerShell.

Go ahead and right click Windows Powershell and RUN AS Administrator

Now let’s check our version of powershell that we are currently running.

1.     To Check your version number type $PSVersionTable, then hit return.

Here we see were running PowerShell Version 5.1


The version of PowerShell and the version of WMF is the same thing.

2.     Updating the Help System – To date the latest version of windows 10 and server 2016 comes with PowerShell Version 5.1

By default PowerShell comes with a minimal help system so it must be updated. So let’s go ahead and update the help system on this windows 10 VM

If you want to follow along, Be sure to open the console version of PowerShell as an Administrator.


Commands for updating the Help System:

You could use Update-help -force (Will download the latest help from the internet every time you run it) Or you could just run update-help. If you get an error, try running update-help  –verbose ,press return.

Error – Failed to update help for the module WindowsUpdateProvider. You can ignore this error.


Now let’s open the ISE in Administrator mode

Are you ready for your first Practical PowerShell Tip?

Q: Let’s say you have a Windows 10 machine that is Not connected to the internet. How can you update the help files? This is a common scenario on secure networks

A: You can use Save-Help, that will save a copy of the help files from the internet.

Then you run update-help on the computer with no internet connectivity, pointing the command to the downloaded copy of the help file .

Let’s check it out:

Type explorer

Now what we want to do is create a help folder on the C: drive of your VM.

Close Explorer

Then type this command: Don’t worry about the syntax – I’ll explain all of this later.

 Now go ahead and type Save-help -DestinationPath “C:\help” -Force -verbose (forces the update. We are pulling all the help files and saving them to the help folder.

After the command executes, from the console type explorer

Open C:\help and checkout all the help files

Now, you will need to get those help files to the computer without an internet connection. Just create a help folder on your USB drive and copy all these files to the drive. Now copy the help folder to the C:\ root of the computer that doesn’t have an internet connection and run this command.

Type: Update-Help -Sourcepath “c:\help” -Force -Verbose (Note: You can run this with or without the parenthesis)

Error Failed to update help for the UI (user Interface) or the English Language) That means that there is not currently a help file for windowsupdateprovider.

Now were going to be copying these help files into the help system.

Just wanted to demonstrate how to get the help files onto a computer that doesn’t have internet connectivity.


3.     Setting up PowerShell on a server

In this course we will be using Windows server 2016.

Let’s open powershell on the server. If you don’t have Windows Server installed yet, don’t worry we will be setting all that up in the Lab section. I just wanted to show you that the same versions of PowerShell exist on server 2016.

Here is the console version and the ISE. Working with PowerShell from the server will be featured later on in the course.

Next let’s take a closer look at the console version of PowerShell.

Complete and Continue  
Discussion

0 comments