Category Archives: Powershell

PowerCli Update – PowerCLI 5.5 R2

VMware has rolled out a few updates this week with the release of vSphere 5.5 Update 1. The majority of the products involved all got some sort of bump/patch as well as the addition of VSAN. Not to be outdone, Alan and his team also released PowerCli 5.5 R2 (Build 1649237). It is wonderful to see grand improvements in a product I use everyday.

A full rundown of the new features and download link can be found here.

It just may be time to give a serious look at updating to PowerShell 4.0 as with this update, PowerCli is fully compatible. Time to start looking at other plugins as well and determine what dependencies might have issues.

Another one of the new features that caught my eye was this:

64 bit Support

The New/Set-OSCustomizationSpec cmdlets have been updated to work in 64-bit PowerShell and no longer require running in a 32-bit PowerShell environment.

This will help my VM Deployment script as you will now longer have to run in 32bit mode.  I’ll be checking this out and updating shortly.

Advertisements

PowerShell – Zip Folder and Email

When working with files and folders, one of the things we do often is zip (compress) them, either for smaller archives or possibly to send as an attachment via email. In this short post, I’ll show how we can use 7-zip to compress a folder and email it using PowerShell.

Continue reading

Updating Remote Passwords with PowerShell

Changing passwords is always one of those fun tasks for any admin. It becomes even more challenging when your a Windows admin over hundreds of individual servers that are not part of the same domain.  Here’s my take on a PowerShell script to change the password of a local user on a remote system (or many remote systems), regardless of domain status.

Continue reading

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