Installing
if ($psVersionTable.psEdition -eq 'Desktop' -and (get-module -name azureRM -listAvailable)) {
write-warning -Message('Having both the AzureRM and Az modules installed on PowerShell Desktop at the same time is not supported.')
} else {
install-module -name az -allowClobber -scope currentUser
}
Apparently, the repository is untrusted:
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the
Set-PSRepository cmdlet. 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"): Y