-
-
Save mattruma/5f312fe2fff094ed63d394ed407c396d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$Tenant | |
) | |
If ($Tenant.Trim() -eq "" ) { | |
$Tenant = Read-Host -Prompt "Enter your FIRST part of your tenant name, e.g. if your tenant was microsoft.onmicrosoft.com, just enter microsoft" | |
} | |
If ($Tenant.Trim() -eq "" ) { | |
Throw "Tenant is required, either enter as a prompt or provide a value for the -Tenant argument" | |
} | |
Connect-AzAccount -Tenant "$($Tenant).onmicrosoft.com" | |
az login --tenant "$($Tenant).onmicrosoft.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment