Trevor Sullivan's Tech Room - Minding the gap between administration and development

Azure PowerShell 0.9.0 Released with Azure Resource Manager!

During the Microsoft //BUILD 2015 conference in San Francisco, California, they have released the newest version of the Microsoft Azure PowerShell module! The version is 0.9.0, and is dated April 2015. You can download the stand-alone Windows Installer (MSI) package from the GitHub releases page. Azure Resource Manager (ARM) The most significant enhancement in the…

Read More

PowerShell: Resizing Azure Virtual Machines

Background Did you know that you can scale virtual machines in Microsoft Azure? If you’ve been working with the cloud, you’ve most likely heard about that capability before, but did you know that you can automate this function using PowerShell? It’s true! You can streamline many different operations in Microsoft Azure, using the Azure PowerShell…

Read More

PowerShell: Retrieve Azure Storage Blob Containers Asynchronously

Background When you’re working with the Microsoft Azure platform, as a developer or an IT pro, you will almost certainly leverage the Microsoft Azure Storage service. The top-level object in the Azure Storage service is called a “Storage Account.” Each Storage Account can contain the following types of storage objects: Azure Files (SMB) shares (PaaS…

Read More

Simple Azure VM RDP PowerShell Script

Background If you’re using the Microsoft Azure platform, you probably have built up one or more virtual machines. Virtual machines in Azure are great for testing, because you can easily destroy and rebuild them if you mess something up. As an additional benefit, you don’t have to risk messing up your local desktop, laptop, or…

Read More

PowerShell: Validating Azure Traffic Manager Endpoints

As some of you may already be aware, the Microsoft Azure cloud platform provides a service called Traffic Manager. Traffic Manager is a DNS-based load balancing service, and helps to ensure application high availability, by offering three profiles types (also known as “load balancing methods”): Performance – points DNS clients to the lowest-latency cloud resource…

Read More

PowerShell: Add Unique IDs to Your Objects

If you’re developing interactive PowerShell scripts, that frequently prompt for user input, it is often desirable to uniquely identify objects. Enabling the end user to select the object that they wish to operate on, in a simple fashion, reduces the amount of end user effort required to operate the script. For example, if you are…

Read More

Azure PowerShell :: Error Creating New Virtual Machine

Today, I was trying to create a new Standard_DS1 size virtual machine from the Azure PowerShell module, version 0.8.13. The typical process for building a virtual machine in Azure, using PowerShell, looks like the following: Create a new Azure virtual machine configuration using New-AzureVMConfig Add provisioning details (username, password for the VM) using Add-AzureProvisioningConfig (optional)…

Read More

Secunia Webinar Follow-up

Thanks to everyone who attended my recent webcast with Secunia’s “We Speak Geek” series! The topic of discussion was deploying a lab for System Center Configuration Manager in Microsoft Azure, and automating the majority of the process in PowerShell. Want to deploy a #ConfigMgr lab in #Microsoft #Azure using #PowerShell? @Secunia webcast starts in 1…

Read More

Clean up unused Azure VHD Disks

Introduction The Microsoft Azure platform maintains a list of VHD blobs that have been registered as “disks” in your Azure subscription. You can view a list of registered “disks” by opening the Azure Portal, going to the Virtual Machines node, and selecting the Disks link. Each Azure disk has a property called AttachedTo that indicates…

Read More

Implementing a .NET Class in PowerShell v5

Introduction

You might have heard that PowerShell version 5.0 has introduced support for building .NET classes. Indeed, this is a powerful, new capability that has not previously existed in native PowerShell syntax. Before the new class-building syntax existed, if you wanted to build custom objects in PowerShell, you generally would either: 1) use the [PSCustomObject] type, or 2) build a .NET class in C#, and use the Add-Type command to import it into the PowerShell session.

Read More