Skip to content

Instantly share code, notes, and snippets.

@Splaxi
Last active January 20, 2021 07:38
Show Gist options
  • Save Splaxi/dff9ff1eaaea55c77389449ab197372a to your computer and use it in GitHub Desktop.
Save Splaxi/dff9ff1eaaea55c77389449ab197372a to your computer and use it in GitHub Desktop.
Update Azure Automation Account - AzureRm & Az modules coexists
<#
You need to read this docs page: https://docs.microsoft.com/en-us/azure/automation/automation-update-azure-modules
Download the mentioned file from the github repo: https://github.com/Microsoft/AzureAutomation-Account-Modules-Update
You need to start a new PowerShell session, without profile
from cmd you can run:
powershell.exe -nologo -noprofile
#>
$PSModuleAutoloadingPreference = "none"
Import-Module Microsoft.PowerShell.Management
Import-Module AzureRM.profile
Import-Module AzureRM.Automation
Import-Module Microsoft.PowerShell.Archive
Connect-AzureRmAccount
.\Invoke.ps1 -ResourceGroupName "RGNAME" -AutomationAccountName "AutoAccountName" -Login $false -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment