When developing PowerShell scripts working with Azure it's very convenient to script the login part so you are not prompted each time you tweaked the script and re-run it. You archive this by creating a PSCredential object and passing to it your email and password (converted to a secure string first) as in a snippet below $email='your email' $pwd = 'your password' | ConvertTo-SecureString -AsPlainText -Force $cred = New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList $email, $Pwd Login-AzureRMAccount -credential $cred This works fine with corporate email addresses but if you try to use your Live ID (Hotmail or Outlook) you get back this error Login-AzureRMAccount : Sequence contains no elements At line:8 char:1 + Login-AzureRMAccount -credential $cred + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFaile...