Insanely simple and incredibly useful PowerCLI snipits

I find that I’m spending an increasing amount of time in PowerCLI, partly that’s because I am working with groups of hosts or vms. It’s not that I’m working with scripts all the time, just that if I need to do some action at scale, a foreach loop is going to save a bunch of […]

PowerCLI – Find mac in a haystack

find a vms mac in two minutes with this really useful one-liner Get-VM | Get-NetworkAdapter ยด | Where-Object {$_.MacAddress -eq “00:50:56:xx:xx:xx:”} | Select MacAddress,NetworkName,Name,Parent,ConnectionState Ok, it’s a bit slow to run, this function by Robert van den Nieuwendijk is much faster   [code language=”powershell”] function Get-VmByMacAddress { <# .SYNOPSIS Retrieves the virtual machines with a […]