Enable Intellisense for AWS Boto3 Type Hints in Microsoft Visual Studio Code

If you’re developing with Python and the Amazon Web Services (AWS) boto3 module, you probably wish you had type hints (aka. auto-complete / Intellisense) in Microsoft Visual Studio Code. Even though the boto3 documentation is exceptionally good, it’s annoying to constantly have to switch back and forth between it and your editor. More context switching … Read more Enable Intellisense for AWS Boto3 Type Hints in Microsoft Visual Studio Code

[Video] Improving Randomness in the Get-Random PowerShell Command

Although it may seem like the Get-Random command in PowerShell provides random data, it actually returns data that is more predictable than you think. If you’re looking to generate some truly “interesting” data for your project, then you’ll want a better approach. In this video, we’ll explore the limited randomness of the Get-Random command, using … Read more [Video] Improving Randomness in the Get-Random PowerShell Command

Microsoft MVP Renewal: Third Consecutive Year

This morning, I received the coveted, diamond-like e-mail that most people anticipate with fervor. For the third year in a row, I have been awarded the Microsoft MVP award for contributions to the community. I very much enjoy, and am passionate, about being involved in various IT communities, locally, nationally, and across the entire world. … Read more Microsoft MVP Renewal: Third Consecutive Year

Import-DscResource Warning Message in WMF 5.0 April 2015 Preview

The latest version of the Microsoft Windows Management Framework (WMF) Core 5.0 package has some improvements to the PowerShell and Desired State Configuration (DSC) experience. One of those improvements is a warning message that will appear, if you do not use the Import-DscResource dynamic keyword to import the PSDesiredStateConfiguration module. The warning message appears when … Read more Import-DscResource Warning Message in WMF 5.0 April 2015 Preview

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

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

Fix for Service Unavailable in PowerShell DSC Pull Server

Introduction

HTTP 503: Service Unavailable

I recently tried to setup a Microsoft Windows PowerShell Desired State Configuration (DSC) Pull Server, and was receiving an error from IIS. I used the xDscWebService DSC Resource, from the xPSDesiredStateConfiguration PowerShell module, to configure the DSC Pull Server. When I tried to browse to the IIS Web Service for the Pull Server, I was receiving a HTTP 503: Service Unavailable message from Internet Explorer. I believe it is important to note that the Microsoft Windows Azure Pack (WAP) is also installed on the same server where I am trying to deploy the DSC Pull Server.

Read moreFix for Service Unavailable in PowerShell DSC Pull Server

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

Use PowerShell DSC to Enable Screencast Recording on Azure VMs

Do you ever record screencasts, and post them to YouTube, or some other video sharing site? Well, maybe you do, maybe you don’t, but I sure do (when I find time)! For the sake of simplicity, I use an older, free Microsoft tool called Expresion Encoder 4.0 with Service Pack 2 (SP2). You can download it, again for free, from here! In some cases, it might be preferable to invoke screencast recording on a remote session, rather than recording on your local computer, however. In this post, we will take a look at how to use PowerShell Desired State Configuration (DSC) to automatically install Microsoft Expression Encoder 4.0 SP2 onto cloud-hosted Microsoft Azure Virtual Machines!

Unless you’re a MSDN subscriber, with access to Windows 8.1 VM images in Azure, most of your Azure Virtual Machines will be running some class of Windows Server. In this case, we’ll be using a Windows Server 2012 R2 VM. The first thing to point out is that Windows Server 2012 R2 requires the “Desktop-Experience” Windows Feature to be installed, in order to successfully run Microsoft Expression Encoder 4 SP2. If this Windows Feature isn’t installed, you’ll get a nasty error telling you that wmvcore.dll is missing, when you try to run the Expression Encoder program.

While working with Expression Encoder in Azure, one limitation you’ll want to keep in mind is that Expression Encoder has a problem rendering your screencast content inside the editor. So, if you want to make any modifications to your screencast, after you’ve recorded it, you’ll have to download the content locally onto your computer.

With all of that out of the way, let’s get DS-configuring! The first thing we need to do is ensure that the “Desktop-Experience” Windows Feature is installed. To do that, we will use the built-in WindowsFeature DSC resource. To start building our configuration, let’s use this code:

Read moreUse PowerShell DSC to Enable Screencast Recording on Azure VMs