Skip to content

Instantly share code, notes, and snippets.

@harrewarre
Created October 10, 2017 10:39
Show Gist options
  • Save harrewarre/fe017a95ee82d61d7784278f81f07ea6 to your computer and use it in GitHub Desktop.
Save harrewarre/fe017a95ee82d61d7784278f81f07ea6 to your computer and use it in GitHub Desktop.
PS Run Azure RM template as Service Principcal
$psCredential = New-Object System.Management.Automation.PSCredential("client", (ConvertTo-SecureString "secret" -AsPlainText -Force))
Add-AzureRMAccount -ServicePrincipal -Tenant "tenant" -Credential $psCredential
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment