magritton
4/17/2015 - 2:17 AM

Test if Azure account exists in power shell, if it does not then add it

Test if Azure account exists in power shell, if it does not then add it

$azAcct = Get-AzureAccount
if($azAcct -eq $null)
    {Add-AzureAccount}
else
    {Write-Output 'Az Account Exists'}