Step by Step installation of PowerShell 7 Preview and Az-Module and configure the environment in VS Code
Dear Friends, as you are aware PowerShell 7 Preview has been released recently. PowerShell 7 was designated to become the replacement product for PowerShell Core 6.x products as well as Windows PowerShell 5.1, which is the last supported Windows PowerShell version and now you can install the PowerShell 7.0 Preview in your computer by running the below command.
It will then download the required files for the installation in your computer as you can seen below.
Next step is to progress with the setup wizard.
Choose the default directory for the installation
Powershell path will be added in the Environment Variable in your computer with the below step.
Once you click next it will install the Powershell 7 Preview.
The installation will progress as you can see below.
Once done please click on the finish button.
Now you can open the Visual Studio Code and make sure that you switch to PowerShell 7.0 Preview as you can see below
Once done you can run the below command to import the Az-Modules
Please run the below command
Install-Module –Name Az –AllowClobber
To verify the imported Az modules you can run the below command
Get-Module Az.* -ListAvailable | Select-Object Name -Unique
It will show below output
To discover the available cmdlets within a module you can use the Get-Command
cmdlet. In this example we browse all cmdlets within the Az.Account module:
Get-Command -Module Az.Accounts
The next step is to update the help files for PowerShell 7.0 Preview installation, you need to run the below command and it will download the latest help files.
Once done you can use the Get-Help command to see the examples of new Az commandlets as you can see below
Get-Help New-AzTag -Examples
And the output will be similar to this
That’s all for today, I think you are now ready to run and test all your scripts in the new environment, in my next post I will import the Az Module and run few scripts over there and we will see how it goes. Stay tuned guys.