So as always things change across multiple Window’s operating systems and VMware revisions. I had a need to extend the drives on about 50 VMs today and really didn’t want to do all that clicking. I remember awhile back it was easy to do this with a Basic Set-Harddisk and use the -ResizeGuestPartition but alas that has been removed from the current functionality. So I took my search to google and found a couple scripts that worked ok, but nothing that was a seamless experience.
I will be sharing it with you to save you the time. The script is very simple all you need to do is pass it the VM Name, VMware Hard Disk #, New Hard Disk Size in GB, and the Volume Letter.</p>
Once done, you can execute the script by running .\ScriptName.ps1 VMname as seen in the below screenshot.