November 18th, 2014

PowerTip: Get Azure Subscription Names with PowerShell

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to get the name of cmdlets referring to your Azure subscription.

Hey, Scripting Guy! Question Is there an easy way to obtain the Azure cmdlets referring to my subscription name?

Hey, Scripting Guy! Answer Use the Get-AzureSubscription cmdlet and access the SubscriptionName property:

(Get-AzureSubscription).subscriptionname

If you have multiple subscriptions, you can access them individually:

(Get-AzureSubscription)[0].subscriptionname

(Get-AzureSubscription)[1].subscriptionname

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback