Category Archives: Powershell

Deploying multiple VMs via PowerCLI

Find the latest version here.

Here’s a PowerCLI script I have been playing with for a while that helps with deploying multiple VMs.

Highlights include deploying both Windows and Linux VMs via Customization Specification enabling the setting of hostname, IP address, etc. The script uses help from LucD to deploy using -RunAsync which speeds things up tremendously.

It’s a bit lengthy, with a rudimentary level of logging and error catching but has served me well.

Continue reading

Searching through all those script files: Find-Script

If you are like me, you have built up a good amount of scripts over time and haven’t yet made it to the point of creating modules or other ways to handle all of them. I needed a way to be able to search through all these scripts to find the little gems that hide within.

I came up with this short and sweet script I can run quickly to find the tidbits I am looking for. The script will prompt for a keyword and then search recursively the path specified showing the output via Out-GridView.

Not a perfect solution but works very well. It could also be tweaked to search files other than *.ps1 easily enough.

Continue reading