Scripting Blog [archived]

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

Latest posts

Jun 10, 2016
Post comments count 0
Post likes count 0

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

Doctor Scripto

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

Jun 9, 2016
Post comments count 0
Post likes count 0

PowerTip: Search Azure Resource Manager image publishers by using PowerShell

Doctor Scripto

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.

Jun 9, 2016
Post comments count 0
Post likes count 0

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

Doctor Scripto

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

Jun 8, 2016
Post comments count 0
Post likes count 0

PowerTip: Change current Azure Resource Manager subscription by using PowerShell

Doctor Scripto

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*

Jun 8, 2016
Post comments count 0
Post likes count 0

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

Doctor Scripto

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

Jun 7, 2016
Post comments count 0
Post likes count 0

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

Doctor Scripto

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:

Jun 7, 2016
Post comments count 0
Post likes count 0

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

Doctor Scripto

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

Jun 6, 2016
Post comments count 0
Post likes count 0

PowerTip: Find available virtual machine size by using PowerShell

Doctor Scripto

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.

Jun 6, 2016
Post comments count 0
Post likes count 0

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

Doctor Scripto

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