Connect-AzAccount without prompt
问题 I am trying to login into Azure Portal by using Connect-AzAccount This code asks me for a prompt which I don't want, can we Auto login by using some simple config script. 回答1: As Joy said, you could login with the user account by credential which will no prompt, make sure your account doesn't enable the MFA. $User = "xxx@xxxx.onmicrosoft.com" $PWord = ConvertTo-SecureString -String "<Password>" -AsPlainText -Force $tenant = "<tenant id>" $subscription = "<subscription id>" $Credential = New