Created
November 16, 2015 19:40
-
-
Save devigned/a41a64a477c0b3c77f7b 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
# To login to Azure Resource Manager | |
Login-AzureRmAccount | |
# You can also use a specific Tenant if you would like a faster login experience | |
# Login-AzureRmAccount -TenantId xxxx | |
# To view all subscriptions for your account | |
Get-AzureRmSubscription | |
# To select a default subscription for your current session | |
Get-AzureRmSubscription –SubscriptionName “your sub” | Select-AzureRmSubscription | |
# View your current Azure PowerShell session context | |
# This session state is only applicable to the current session and will not affect other sessions | |
Get-AzureRmContext | |
# To select the default storage context for your current session | |
Set-AzureRmCurrentStorageAccount –ResourceGroupName “your resource group” –StorageAccountName “your storage account name” | |
# View your current Azure PowerShell session context | |
# Note: the CurrentStoargeAccount is now set in your session context | |
Get-AzureRmContext | |
# To import the Azure.Storage data plane module (blob, queue, table) | |
Import-Module Azure.Storage | |
# To list all of the blobs in all of your containers in all of your accounts | |
Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment