Created
October 24, 2019 11:40
-
-
Save maxali/8d024235380bc8075ae8a1e0e11cf5b9 to your computer and use it in GitHub Desktop.
Connect-AzureRmAccount Cmdlet using Service Principal with Credential
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$applicationId = "<your application ID goes here>"; | |
$securePassword = "<your password goes here>" | ConvertTo-SecureString -AsPlainText -Force | |
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $applicationId, $securePassword | |
Connect-AzureRmAccount -ServicePrincipal -Credential $credential -TenantId "tenantId" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment