PowerShell: PSReadLine Module

The PSReadLine PowerShell module is a god-send in the world of the PowerShell console host. The console host (powershell.exe) has gotten a lot of flak, over the years, for lacking functionality that most non-Windows users are accustomed to having. Some of the enhancements that you get out-of-box with PSReadLine include: …

Continue reading

Writing Interactive Scripts with PowerShell

If you’re authoring PowerShell scripts that are intended to be interactive, there are a couple of very easy ways to ask your users for input. Typically, user input falls into a couple categories: free-form text input, or a list of pre-defined values. We also might need to prompt the user …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

PowerShell Twitter Update [2013-02-24]

So it’s getting close the end of February, and it’s been several months since I’ve blogged anything new! For today’s post, let’s take a look at what’s going on, on Twitter in the PowerShell universe! #ConEmu @tphakala says that he’s discovered a project called #ConEmu. #ConEmu is a project hosted …

Continue reading

PowerShell: Measuring Download Speeds

Have you ever downloaded a file from the Internet? Probably. Have you ever downloaded a file with PowerShell? Maybe. Have you ever wondered how fast your download was going? Sure. Have you ever wondered how to get that information when you’re downloading a file with PowerShell? Maybe, but you didn’t …

Continue reading

PowerShell: Updating an Azure Service Display Name

If you’re like me, you probably like clarity, consistency, and conciseness. Given that, I like to ensure that names of hosted services in Windows Azure are named appropriately. Sometimes developers will give a service a quick name that they understand, but may not relay enough information to other team members, …

Continue reading

PowerShell: Embed binary data in your script

When writing automation scripts or modules, you might find that you frequently reference external binary data. “Binary data? Well, that accounts for all data!” you might say. Yes, that’s true. But I’m talking about binary data as opposed to files containing simple ASCII or UTF-8 data. Maybe there’s some better …

Continue reading