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 morePowerShell: Retrieve Azure Storage Blob Containers Asynchronously

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 moreSimple Azure VM RDP PowerShell Script

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 morePowerShell: Validating Azure Traffic Manager Endpoints

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 morePowerShell: Add Unique IDs to Your Objects

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 moreAzure PowerShell :: Error Creating New Virtual Machine

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 moreSecunia Webinar Follow-up

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 moreClean up unused Azure VHD Disks

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 moreImplementing a .NET Class in PowerShell v5

PowerShell: Build Windows 10 Server Technical Preview VM in Azure

You’ve probably heard about Windows 10 and the Windows Server Technical Preview, right? You can download the Windows 10 Client operating system from https://insider.windows.com, and you can download the Windows Server Technical Preview from your MSDN account, if you have one. A lot of people have stated that the download of the ISO images is taking hours on their slower Internet connections, so what if I told you that you could get up and running with Windows 10 Server Technical Preview, in just a matter of minutes? Does that sound like a good thing to you?

Read morePowerShell: Build Windows 10 Server Technical Preview VM in Azure

Use PowerShell DSC to Install DSC Resources

IMPORTANT: This post was authored in August 2014, and is out of date. At this point, you should be installing PowerShell DSC resources from the PowerShell Gallery, using the PowerShellGet\Install-Module command.

Introduction

A lot of the functionality provided by Microsoft PowerShell Desired State Configuration (DSC) comes, not from the core product, but from the DSC Resources that are provided by Microsoft and the community. When you spin up a new Windows operating system, whether a physical machine, local virtual machine, or a Microsoft Azure virtual machine, you start out with a pretty barebones set of DSC resources. Those resources are listed here:

  • File
  • Archive
  • Environment
  • Group
  • Log
  • Package
  • Registry
  • Script
  • Service
  • User
  • WindowsFeature
  • WindowsProcess

Unfortunately, most people are going to need more capabilities than what is offered out of the box. To that end, Microsoft has been regularly providing “waves” of DSC resources to manage a variety of different applications. As of this article’s writing, the latest wave of DSC resources from Microsoft was “DSC Wave 6,” published on August 21, 2014. During the remainder of this article, our goal is to make sure that these additional DSC Resources are installed on our systems, in an automated fashion!

Read moreUse PowerShell DSC to Install DSC Resources