Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: Change current Azure Resource Manager subscription by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to alter the current active subscription in use. (image) I have about a dozen different subscriptions in my Azure Resource Manager account. How can I change it from the default one to one of my others? (image) You can do this very task by using the Select-AzureRMSubscription cmdlet and ...

PowerTip: Get the time and date as a string of numbers by using PowerShell

Summary: Use the –format option in Get-Date to change the output. (image) I’d like to build some log files and have the date and time as part of the name. Is there a way to show the date and time in a format where it’s all numbers? (image) Absolutely! Just use the –format option with Get-Date and supply a format for the output. To ...

PowerTip: List all Azure Resource Manager storage accounts by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to identify available storage accounts. (image) I’m working a client site, and they’d like me to document the configuration of their Azure Resource Manager environment. I’m in desperate need of a list of the storage accounts. Help me, please? (image) One cmdlet and you’re done. Just ...