View GetUnusedStorageAccounts
# Ref: http://manesh.me/2015/02/06/cleaning-up-azure-storage-accounts/ | |
Get-AzureStorageAccount -WarningAction SilentlyContinue | ForEach-Object { | |
$storageAccountName = $_.StorageAccountName | |
$storageAccountKey = (Get-AzureSTorageKey $storageAccountName).Primary | |
$storageContext = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey | |
Write-Host "" | |
Write-Host "Storage Account : " $storageAccountName | |
Get-AzureStorageContainer -Context $storageContext | ForEach-Object { | |
$containerName = $_.Name; |
View SetAzureEnvironment
# Ref: http://manesh.me/2015/02/05/getting-started-with-microsoft-azure-powershell/ | |
# Step 0: Define all variable values | |
$publishSettingsFile = "C:\Users\Manesh\Documents\AzureSubscriptions.publishsettings"; | |
$location = "West US"; | |
$subscriptionName = "Visual Studio Premium with MSDN"; | |
# Sometimes, you might have multiple MSDN subscriptions | |
# If someone else add you as a co-admin on their MSDN subscription etc. | |
# If so, choose the subscription Id option |