Handling Objects not Found in Active Directory

The Active Directory module for PowerShell has been around for a very long time now, and it’s even still an OG Windows PowerShell module. I noted some interesting behaviour on some recent work I wanted to share.

Continue reading “Handling Objects not Found in Active Directory”

Off Topic: An Interesting SQL Query

It is likely that many of us working in the automation space and/or working with PowerShell will need to write SQL queries. We aren’t SQL developers by any means, but we do what we can to get by. When developing a recent piece of automation I ended up writing this query that I thought demonstrated a useful technique.

Continue reading “Off Topic: An Interesting SQL Query”

Preparing for a PowerShell Interview

My PowerShell experience has been gained in roles that typically have a mash of other infrastructure skills, Hyper-V, vSphere, all things Windows (and sometimes Linux). It is not often you see dedicated PowerShell development roles come along, like you do with Python for instance. Last year I had the opportunity to apply for such a role which got me thinking that it could be a good topic for a blog article.

Continue reading “Preparing for a PowerShell Interview”

Module Overhaul: tds-vRops

In the automation world, we have a tendency to touch on a particular product or technology then move on to something else. I did a bit of work on vRops a while back now, and having circled back around to it recently it was time to update the module and add some new functions relating to what I was doing. Read on to see what’s new.

Continue reading “Module Overhaul: tds-vRops”

ESXi NTP Configuration with PowerShell

As part of a recent automation workflow, I had cause to configure NTP on ESXi hosts. I honestly thought this would be easier than it was, but a couple of issues led me to “roll my own” function which I’m sharing here.

Continue reading “ESXi NTP Configuration with PowerShell”

Native TAR File Extraction with PowerShell

That’s right, tar-ball 😉

On one of my projects recently, I had cause to extract a .tar.gz file during the automation process. If you are in this scenario there are potentially a couple of options around this which I’ll cover off. However, I wanted a simple, native function with no dependencies, so keep reading to see what I’ve come up with.

Continue reading “Native TAR File Extraction with PowerShell”

Building ISO Files with PowerShell 7

A function that’s been part of my toolkit for a long time is New-ISOFile by Chris Wu. This excellent little function allowed you to build an ISO file directly from PowerShell, even a bootable one.

I came to use it recently on an automation project with PowerShell 7 and discovered there was some compatibility issue that prevented it from working. I noticed that the original Technet site that the function came from originally is now gone, so I considered this an opportunity for some code review and hopefully produce a revised function that works with PowerShell 7.

Continue reading “Building ISO Files with PowerShell 7”

ESXi & The Big MAC Mystery

A scripting “opportunity” came up this week. Apparently ESXi assigns a virtual (or “shadow”) MAC address to each of its physical adapters, over and above the native physical MAC. The request was to report on all of these MACs across a large number of hosts. Read on to see how this resulted in the Get-esxiShadowMAC function.

Continue reading “ESXi & The Big MAC Mystery”