Scripting Blog [archived]

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

Latest posts

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

PowerTip: List all virtual network subnets by using PowerShell

Doctor Scripto

Summary: Use the Azure Resource Manager cmdlets to identify all the available subnets in a particular virtual network. I’m trying to figure out a way to list all the subnet configurations in a virtual network in Azure Resource Manager. Got any tips? How about the answer? It’s a matter of combining the Get-AzureRMVirtualNetwork cmdlet and Get-AzureRMVirtualNetworkSubnetConfig. Here is an example:

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

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

Doctor Scripto

Summary: Use PowerShell to retrieve Azure Resource Manager virtual machine properties. 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. There’s one thing I couldn’t figure out that I really need your help...

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

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

Doctor Scripto

Summary: Use the Azure Resource Manager cmdlets to identify available storage accounts. 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? One cmdlet and you’re done. Just use the Get-AzureRMStorageAccount cmdlet. If you run this, you’ll only get the list, but you can export it to a .csv file named StorageAccounts.csv. Here is an example:

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

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

Doctor Scripto

Summary: Find storage groups by using PowerShell. 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. Could you lend me a hand? I’m trying to find properties, like the current storage group that a virtual ma...

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

PowerTip: List Azure Resource Manager resources assigned to a resource group by using PowerShell

Doctor Scripto

Summary: Use the Azure Resource Manager cmdlets to show resources that are assigned under a resource group. I looked at the console for Azure Resource Manager and can see all the resources for a particular resource group. Is there a way to see that by using PowerShell? There sure is! Just use the Get-AzureRMResource cmdlet and filter on the ResourceGroupName property. Here’s an example:  

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

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

Doctor Scripto

Summary: Identify properties for the operating system of 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. Can you show me how to identify the properties for the operating system so that...

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

PowerTip: Get Azure Virtual Machine Diagnostics by using PowerShell

Doctor Scripto

Summary: Use the Azure Resource Manager cmdlets to retrieve diagnostic data within Azure Resource Manager virtual machines.  Our QA department was asking a very specific question that I didn’t know how to answer. Is there anything in an Azure virtual machine (VM) to show the quality of the boot and its startup?  Maybe this will help. You can access the boot diagnostics data with a single cmdlet. To retrieve the data for a single machine, use the Get-AzureRmVMBootDiagnosticsData cmdlet and add a parameter to target whether the machine is a Windows VM or Linux VM. Here is an example:

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

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

Doctor Scripto

Summary: Use the Azure Resource Manager cmdlets to get the machine size from 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 remember that yesterday we created a virtual machine (VM)...

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

PowerTip: Show Azure Resource Manager virtual machine status with PowerShell

Doctor Scripto

Summary: Using the Azure Resource Manager cmdlets to see the running state of a virtual machine.  I remember using the old cmdlets for Azure, and they would show the status of my virtual machines.  How can I do that with the new cmdlets?  Use the Get-AzureRM cmdlet with the –Status parameter to expand the available properties. Here’s a simple example to pull the statuses of a virtual machine: Here is an example: