The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.
New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository.
Scripting Blog [archived]
Formerly known as the "Hey, Scripting Guy!" blog
Latest posts
Create Azure Resource Manager virtual machines by using PowerShell – Part 5
Summary: Use the Azure Resource Manager cmdlets to assign credentials and create the 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 to start with the two series that precede this series: Now that I’ve built all the objects for the virtual machine (VM), what’s left before we spin up the machine in Azure Resource Manager? Honorary Scripting Guy, Sean Kearney, is here to finish up our three-week session abo...
PowerTip: Search Azure Resource Manager image publishers by using PowerShell
Summary: Use the Azure Resource Manager cmdlets to search publishers for a match. Could you show me an example of how to search through the list of publishers for Azure images? Just use the Get-AzureRMVMImagePublisher cmdlet, and filter on the PublisherName property. The following example searches for all publishers that contain the name, Windows.
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 to start with the two series that precede this series: I’ve got most of that virtual machine (VM) assembled, but I was having quite a time trying to pull together the operating system image with PowerShell. Nudge me in the right direction, could you? Honorary Scripting...
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. 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? You can do this very task by using the Select-AzureRMSubscription cmdlet and providing either the name of the subscription or the SubscriptionId (which is probably more accurate). Here are examples: *or*
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 want to start with the two series that precede this series: I’m trying to find some guidance about how to use PowerShell to create a virtual network card. Would you be so kind as to lend me a hand? Honorary Scripting Guy, Sean Kearney, is here today continuing forth (...
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. 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? Absolutely! Just use the –format option with Get-Date and supply a format for the output. To see the format as month, day, year, hour, minutes, and seconds, use this example:
Create Azure Resource Manager virtual machines by using PowerShell – Part 2
Summary: Use the Azure Resource Manager cmdlets to define the operating system disk on a storage blob 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 to start with the two series that precede this series: Would you help me, please? I need to know how to define storage for my virtual machine in Azure Resource Manager by using PowerShell. Honorary Scripting Guy, Sean Kearney, is here as we happily go...
PowerTip: Find available virtual machine size by using PowerShell
Summary: Use the Azure Resource Manager cmdlets to get the proper name for a virtual machine size. Is there a way to see the proper name for a virtual machine size without creating a virtual machine first? Just use the Get-AzureRMVMSize cmdlet, and filter on the Name property. You just need to supply a location first. In this example, we are looking at available sizes in the ‘eastus’ location that have ‘S2’ in the name.
Create Azure Resource Manager virtual machines by using PowerShell – Part 1
Summary: Use PowerShell cmdlets to start to create a virtual machine in Azure Resource Manager. 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 to start with the two series that precede this series: How do I create virtual machines (VMs) in Azure Resource Manager by using PowerShell? Where do I start? Honorary Scripting Guy, Sean Kearney, is here, and we’re going to give you some basic step-by-step guidance this week abou...