Skip to content

Instantly share code, notes, and snippets.

@ploegert
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save ploegert/9897755 to your computer and use it in GitHub Desktop.

Select an option

Save ploegert/9897755 to your computer and use it in GitHub Desktop.
POSH, Azure - Connect To Subscription
#Import-AzurePublishSettingsFile $PubFile
$AzureSubName = "be-prod"
$AzureSubName = "be-dev"
$AzureSubName = "be-uat"
Set-AzureSubscription -SubscriptionName $AzureSubName
Select-AzureSubscription -SubscriptionName $AzureSubName
$CurrentSub = (Get-AzureSubscription | where-object { $_.IsCurrent -eq $true }).SubscriptionName
write-host "Current SubscriptionName: $CurrentSub" -foregroundcolor green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment