Skip to content

Instantly share code, notes, and snippets.

@ErikHen
Last active November 22, 2017 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErikHen/4ca158d1aeb4424c4dd4d9330a9d6f5e to your computer and use it in GitHub Desktop.
Save ErikHen/4ca158d1aeb4424c4dd4d9330a9d6f5e to your computer and use it in GitHub Desktop.
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