Scripting Blog [archived]

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

PowerTip: Search Azure Resource Manager image publishers by using PowerShell

Summary: Use the Azure Resource Manager cmdlets to search publishers for a match. (image) Could you show me an example of how to search through the list of publishers for Azure images? (image) Just use the Get-AzureRMVMImagePublisher cmdlet, and filter on the PublisherName property. The following example searches for all publishers that ...

Create Azure Resource Manager virtual machines by using PowerShell – Part 4

Summary: Use the Azure Resource Manager cmdlets to select the operating system image for a virtual machine. This blog post is part of a series about how to create Azure Resource Manager virtual machines by using PowerShell. To get the most out of this series, read the posts in order. If you’re new to PowerShell, you might want ...

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 ...

Create Azure Resource Manager virtual machines by using PowerShell – Part 3

Summary: Use the Azure Resource Manager cmdlets to create and attach a virtual network card to a virtual machine. This blog post is part of a series about how to create Azure Resource Manager virtual machines by using PowerShell. To get the most out of this series, read the posts in order. If you’re new to PowerShell, you might ...

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 ...