我使用我的個人電子郵件ID(這是一個Gmail ID)創建了一個「免費試用」帳戶。我發現了錯誤:Add-AzureRmAccount:序列不包含元素(也不適用於Gmail帳戶)
Add-AzureRmAccount : Sequence contains no elements At line:1 char:1 + Add-AzureRmAccount -Credential $cred + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
我跑的代碼是
$username = "[email protected]"
$password = "something"
$secpass = $password | ConvertTo-SecureString -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secpass
Add-AzureRmAccount -Credential $cred
是否有某種類型的其中記錄在這樣應該工作賬戶/訂閱?
感謝您的快速響應馬克! 只是爲了澄清,使用Gmail帳戶計爲使用Windows Live ID憑據? – datathief
是的,您可以使用任何電子郵件地址創建Windows Live ID afaik。 –
如果您還可以瞭解允許非交互式登錄的帳戶類型以及我如何創建帳戶,那將會很棒。 – datathief