Skip to content

Instantly share code, notes, and snippets.

@jayankandathil
Last active February 12, 2017 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayankandathil/23b57960457dfa4ab36d9eecd61bc0d4 to your computer and use it in GitHub Desktop.
Save jayankandathil/23b57960457dfa4ab36d9eecd61bc0d4 to your computer and use it in GitHub Desktop.
Windows PowerShell Script to Login to an Azure Subscription
# This PowerShell script assumes that your Azure subscription is integrated with your companny's SSO
# Trigger the SSO login dialog (a separate window will come up)
Login-AzureRmAccount
# Choose the subscription (account) you want to work with - you may have multiple subscriptions
Select-AzureRmSubscription -SubscriptionName your_subscription_name_here
# The line below is optional, if you already have a resource group defined along with a storage account
Set-AzureRmCurrentStorageAccount -ResourceGroupname "your_resourcegroup_name_here" -StorageAccountName "your_storageaccount_name_here"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment