Skip to content

Instantly share code, notes, and snippets.

@shawnweisfeld
Created May 24, 2016 23:23
Show Gist options
  • Save shawnweisfeld/cfc3a797be3b5fb6a3ebf6a7cebf1255 to your computer and use it in GitHub Desktop.
Save shawnweisfeld/cfc3a797be3b5fb6a3ebf6a7cebf1255 to your computer and use it in GitHub Desktop.
$data = Get-Content c:\temp\pwd.txt
$secretvalue = $data | ConvertTo-SecureString
$creds = New-Object System.Management.Automation.PSCredential ('<<ApplicationID>>', $secretvalue )
Login-AzureRmAccount -Credential $creds -ServicePrincipal -TenantId <<TenantID GUID>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment