Created
July 26, 2017 06:30
-
-
Save marckean/386b7d03fa4e028014d5b4b07f5ac6a7 to your computer and use it in GitHub Desktop.
This file contains 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
### Log into Azure using certificate authentication | |
$AzureADAppID = '49fy7934-dc71-4bdd-8804-h9742fyh93y' | |
$certThumbprint = (Get-ChildItem Cert:\LocalMachine\My | where {$_.Subject -match 'PowerShell_SP'}).ThumbPrint | |
$TenantId = '3494h480-6a11-78k0-a439-49hh8f49d0' | |
Login-AzureRmAccount -ServicePrincipal -TenantId $tenantId -ApplicationId $AzureADAppId -CertificateThumbprint $certThumbprint | |
$Subscription = (Get-AzureRmSubscription | Out-GridView -Title "Choose a Source & Target Subscription ..." -PassThru) | |
Select-AzureRmSubscription -SubscriptionId $Subscription.Id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment