Update script to create runas account using Az module
Script "New-RunAsAccount.ps1" from: "https://docs.microsoft.com/en-us/azure/automation/manage-runas-account#prerequisites", stay using AzureRM modules, and when I tried to change cmd-let it's didn't work.
Here the erros i got:
First one:
Import-Module Az.Profile
+ CategoryInfo : ResourceUnavailable: (Az.Profile:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Another error:
.\New-RunAsAccount.ps1 -ResourceGroup $RGAutomationName -AutomationAc ...
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-RunAsAccount.ps1
