Powershell HelpFiles | Powershell Transcript | How to use

Hi Friends, I hope you all are doing well and safe!!

Today we will discuss PowerShell help files, things like, how to update, save etc….

Also we will discuss about powershell Transcripts and its use

So lets dive in..

What is Powershell Help_File

Powershell help files are useful to know about the usages of a PowerShell command. By using the help file we get to know how to use the command, what parameters it accepts, Positional and named parameters, etc.

So basically reading of help files is MUST if you want to learn Powershell

By design, Microsoft doesn’t provide us all the help files, we need to download/update it to use it.

So lets see how to update the help files.

Updating the help files

Open Powershell in Admin mode and run below command, after few seconds it will start downloading and updating the help files live

All helpfiles are stored under below location

Save help files for future use

To download and update PowerShell help files we need an internet connection. But in some situation, you may do not find internet connectivity on a server from where you are executing the update-help command

So for such situation, we can use PowerShell save-help command to save the help files downloaded in a local path, UNC path , USB drive etc. and copy to a server where there is no internet connectivity (For example, DMZ servers) Use the following command to save help files to a local path. I am running this command from within a server where I have internet connectivity

After the download is complete you can see some .cab and .xml files as below in your downloaded location (C:\Temp in my case)

Update PowerShell help files on a server which is not connected to Internet

In the previous step, we have downloaded the PowerShell help files to C:\Temp folder. Copy this folder to a server which is not connected to the Internet and then run following command to update the help file

In my case, I have copied the files in C:\Temp_In_DMZ on a server that is not connected to the internet.

Now to update the PowerShell help file here use following command

Ok that’s all regarding PowerShell help files. Lets see what is Transcripts in Powershell

Powershell Transcripts

Powershell Transcripts are useful to save all the commands and their outputs on console to a file. This will be useful later for review and document the changes OR commands we run.

In the following example, we will start the PowerShell Transcripts and execute few commands to save it to a file.

Transcript started

Now let’s run few commands

I have run above commands, now let’s stop the Transcript using following command

Now if you go to C:\Temp folder you must see a file with name as we have given

See below, when I open the file, I can see all the commands I ran and their outputs

That’s it for today. I hope enjoyed it.

Please share if you liked it. Thank you and stay safe!!!