Skip to content

Instantly share code, notes, and snippets.

@jeevan-vj
Created July 15, 2019 08:44
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 jeevan-vj/fb7b01c1de5a59694a389abbacef2260 to your computer and use it in GitHub Desktop.
Save jeevan-vj/fb7b01c1de5a59694a389abbacef2260 to your computer and use it in GitHub Desktop.
#Login with service principal
$clientId = "<CLIENT ID>"
$credentials = New-Object System.Management.Automation.PSCredential ($clientId, $securePassword)
Login-AzureRmAccount -ServicePrincipal -TenantId "<TENANTID>" `
-SubscriptionId "<SUBSCRIPTIONID>" `
-Credential $credentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment