Below some quick actions and references about common issues regarding Azure PowerShell.

I will keep the article updated.

Issue 1 – Installation

One good practice is to install Azure PowerShell from Web Platform Installer,

You can also refer to the article below, it also contains many useful information

http://www.manuelmeyer.net/2016/05/azure-tip-1-installing-azure-powershell-using-the-web-platform-installer/

Issue 2 – Unrecoverable

In case of very critical and understandable situation and behaviours, or you have an error as below, then the installation is probably corrupted, reinstall Azure PowerShell

you probably need to clean everything and starting from scratch, execute the command below in PowerShell

get-module azure* -list |uninstall-module

This command uninstalls any module starting with azure

You will see a lot of red error because resources locked, leave it terminate.

After that, restart and install back using Web Installer, refer below, good article.

http://www.manuelmeyer.net/2016/05/azure-tip-1-installing-azure-powershell-using-the-web-platform-installer/

Issue 3 – On-Premise setup

You can occur in errors during setup an on-premise feature like FileSync or Gateway, most of the time you probably miss and you need to install
the posh-git library, then navigate here https://github.com/dahlbyk/posh-git

And you probably need to install the Framework 5.1 navigate here
https://www.microsoft.com/en-us/download/details.aspx?id=54616

Issue 4 – AzurerRM and AzureRmVN

If you face issues about it Azure modules.

Check the PS version installed then

Get-Module PowerShellGet -list | Select-Object Name,Version,Path

You should see as below, if not then you need to install PSG

Execute as below to install AzueRM without many issues

find-module -name AzureRM | install-module

In case the repo is not trusted you will get as below:

Are you sure you want to install the modules from ‘PSGallery’?

[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): Answer Yes or yes to All

If you need to check AzureRM version use

Get-Module AzureRM -list | Select-Object Name,Version,Path

Issue 5 – about_Execution_Policies

If you face the classic error:

File.ps1 cannot be loaded. The file file.ps1 is not digitally signed. You cannot run this script on the current system.

For more information about running scripts and setting execution policy, see about_Execution_Policies at …

Execute

set-executionpolicy Unrestricted

and answer Y or A

Best References:

Good article related:

http://www.manuelmeyer.net/2016/05/azure-tip-1-installing-azure-powershell-using-the-web-platform-installer/

Microsoft official

https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps


1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here