Created
October 26, 2016 10:39
-
-
Save nordineb/04c18a5243f2b532482c753e00732a59 to your computer and use it in GitHub Desktop.
Login With Service Principal
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
$AzureAccountPassword = "xxxxxxxxxxxxxxxxxxxxxxxxx" | |
$AzureAccountUsername = "xxxxxxxxxxxxxxxxxxxxxxxxx" | |
$AzureAccountTenantId = "xxxxxxxxxxxxxxxxxxxxxxxxx" | |
$secpasswd = ConvertTo-SecureString -AsPlainText $AzureAccountPassword -Force | |
$mycreds = New-Object System.Management.Automation.PsCredential($AzureAccountUsername,$secpasswd ) | |
Login-AzureRmAccount -ServicePrincipal -Credential $mycreds -TenantId $AzureAccountTenantId | |
Get-AzureWebsite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment