Instantly share code, notes, and snippets.

Embed
What would you like to do?
function Login() {
$azureappid ="45d6472e-0526-4a12-8c58-959f697eb296" #your Azure application id
$azurepassword = ConvertTo-SecureString "YourSecretPassword" -AsPlainText -Force
$pscred = New-Object System.Management.Automation.PSCredential($azureappid, $azurepassword)
Login-AzureRmAccount -Credential $pscred -ServicePrincipal -TenantId "31d2b6c6-a122-456c-b9a5-af2d7e3fbf0f" #you Azure subscription Tenant id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment