Skip to content

Instantly share code, notes, and snippets.


Manesh Raveendran Manesh-R

View GitHub Profile
Manesh-R / GetUnusedStorageAccounts
Last active Aug 29, 2015
Microsoft Azure: Find out storage accounts that are good to be deleted -
View GetUnusedStorageAccounts
# Ref:
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;
Manesh-R / SetAzureEnvironment
Last active Sep 24, 2015
PowerShell script to initialize Azure subscription and storage account.
View SetAzureEnvironment
# Ref:
# 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