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
PowerTip: List all virtual network subnets by using PowerShell
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:
Retrieve Azure Resource Manager virtual machine properties by using PowerShell – Part 5
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...
PowerTip: List all Azure Resource Manager storage accounts by using PowerShell
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:
Retrieve Azure Resource Manager virtual machine properties by using PowerShell – Part 4
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...
PowerTip: List Azure Resource Manager resources assigned to a resource group by using PowerShell
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:
Retrieve Azure Resource Manager virtual machine properties by using PowerShell – Part 3
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...
PowerTip: Get Azure Virtual Machine Diagnostics by using PowerShell
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:
Retrieve Azure Resource Manager virtual machine properties by using PowerShell – Part 2
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)...
PowerTip: Show Azure Resource Manager virtual machine status with PowerShell
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: