Azure Powershell Select-AzureSubscription with subscription id

Question:

I am using Powershell Azure cmdlets to do some operation on each subscription I have.

However, all my subscriptions have the same name. So if I do an operation like:

it always works for the same subscription because the subscriptions only differ in subscription ID.

And the Select-AzureSubscription does not have a -SubscriptionId parameter.

Any ideas how can I find a workaround?

Answer:

Edit the publishsettings file, giving each subscription a different name. Then re-import. At that point, you’ll be able to easily access each one uniquely by name.

Source:

Azure Powershell Select-AzureSubscription with subscription id by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply