Skip to content

Instantly share code, notes, and snippets.

@RichieBzzzt
Created October 2, 2018 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichieBzzzt/7b475b4f6ef126bd82c20a8d9e41f9f0 to your computer and use it in GitHub Desktop.
Save RichieBzzzt/7b475b4f6ef126bd82c20a8d9e41f9f0 to your computer and use it in GitHub Desktop.
try {
Find-Module -Name "AzureRM"
}
catch {
Write-Host "No AzureRM, Installing from PSGallery."
Install-PackageProvider -Name NuGet -Force -Scope CurrentUser
Install-Module AzureRM -Force -Scope CurrentUser
}
finally {
Write-Host "Importing AzureRM"
Import-Module AzureRM -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment