Scripting Blog [archived]

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

Latest posts

May 30, 2016
Post comments count 0
Post likes count 0

Retrieve Azure Resource Manager virtual machine properties by using PowerShell – Part 1

Doctor Scripto

Summary: Use the Azure Resource Manager cmdlets to create a virtual machine. This blog post is part of a series about how to retrieve Azure Resource Manager virtual machine properties 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 first read the preceding five-part series about how to work with Azure Resource Manager cmdlets. After you finish this series, move on to the next series to learn more about the Azure Resource Manager cmdlets.  I was curious about something. Could you show me a simple example to create a ...

May 27, 2016
Post comments count 0
Post likes count 0

PowerTip: List Azure Resource Manager virtual networks with PowerShell

Doctor Scripto

Summary: Use the AzureRM cmdlets to list all available virtual networks in a subscription.  I’m doing work for a client who forgot to give me a list of the virtual networks in the client's Azure subscription. Could you save me some time and show me how to get that list?  Just use the Get-AzureRMVirtualNetwork cmdlet. This will dump the output to the screen in a long list. If you’d like something more readable, such as the name, location and the subnet that it controls, try this one liner:

May 27, 2016
Post comments count 0
Post likes count 0

Work with the Azure Resource Manager cmdlets – Part 5

Doctor Scripto

Summary: Here's how to use PowerShell to create a virtual network and a network security group. This blog post is part of a series about how to work with the Azure Resource Manager cmdlets. To get the most out of this series, read the posts in order. After you finish this series, move on to the next two series to learn more about the Azure Resource Manager cmdlets.  I’ve heard that networking is far more powerful in Azure Resource Manager. Could you take a few minutes to show me how to use PowerShell to set up a basic network for virtual machines (VMs) in Azure?  Honorary Scripting Guy, Sean K...

May 26, 2016
Post comments count 0
Post likes count 0

PowerTip: View properties from a storage account with PowerShell

Doctor Scripto

Summary: View and access the SKU from a storage account for future use.  I went to work with the New-AzureRMStorageAccount cmdlet but was confused about how to know which name to use for the SKU. Is there an easy way to know which one to use?  There most certainly is! Just create your storage account in the Azure portal first. Then you use the Get-AzureRMStorageAccount cmdlet to access the SKU property. Here is an example to access ‘hsgstorageaccount’.

May 26, 2016
Post comments count 0
Post likes count 0

Work with the Azure Resource Manager cmdlets – Part 4

Doctor Scripto

Summary: Learn how to use PowerShell to create storage accounts. This blog post is part of a series about how to work with the Azure Resource Manager cmdlets. To get the most out of this series, read the posts in order. After you finish this series, move on to the next two series to learn more about the Azure Resource Manager cmdlets.  Now that we know how to create resource groups, what is our next step to prepare the Azure Resource Manager infrastructure for virtual machines (VMs)?  Honorary Scripting Guy, Sean Kearney, is here today with a wee bit more PowerShell for your Azure Resource Man...

May 25, 2016
Post comments count 1
Post likes count 0

PowerTip: Get all Azure Resource Manager resource groups with PowerShell

Doctor Scripto

Summary: Using the AzureRM cmdlets to get a list of resource groups.  I have a client who has a large list of resource groups. Can you show me how to get a filtered list?  Just use the Get-AzureRMResourceGroup cmdlet and pipe the results to Where-Object. To identify all resource groups that start with HSG in the name, try this;

May 25, 2016
Post comments count 0
Post likes count 0

Work with the Azure Resource Manager cmdlets – Part 3

Doctor Scripto

Summary: Create and access resource groups with the AzureRM cmdlets. This blog post is part of a series about how to work with the Azure Resource Manager cmdlets. To get the most out of this series, read the posts in order. After you finish this series, move on to the next two series to learn more about the Azure Resource Manager cmdlets.  I’m happily sitting here logged into Azure with the AzureRM cmdlets and would like to start with resource groups.  Could you show me where to start?  Honorary Scripting Guy, Sean Kearney, is here again. Yesterday we discovered how to automate authentication ...

May 24, 2016
Post comments count 0
Post likes count 0

PowerTip: Get a list of all subscriptions in your Azure Resource Manager account

Doctor Scripto

Summary: Use the Get-AzureRMSubscription cmdlet.  How can I see all of the available subscriptions when I am logged into Azure Resource Manager?  Just run the Get-AzureRMSubscription cmdlet to get a complete list available to your UserID. Get-AzureRMSubscription

May 24, 2016
Post comments count 0
Post likes count 0

Work with the Azure Resource Manager cmdlets – Part 2

Doctor Scripto

Summary: Authenticate to Azure with the AzureRM cmdlets. This blog post is part of a series about how to work with the Azure Resource Manager cmdlets. To get the most out of this series, read the posts in order. After you finish this series, move on to the next two series to learn more about the Azure Resource Manager cmdlets.  I’ve got the new AzureRM cmdlets installed, but I’m just not sure where to start! Could you give me a nudge in the right direction?  Honorary Scripting Guy, Sean Kearney, is here to help you out. The first real piece you need is to get authenticated to Azure Resource Ma...