Remotely expanding partitions after expanding them in the hypervisor

Once you have expanded an underlying disk in a virtual machine, you still need to expand the disk in the guest. If, like me, you see logging on to a server as an admission of failure, you need a way of scripting it remotely. Here is a function for doing that. You may want to adjust the “includes” to match your possible drive letters.

Senior consultant and company director at The Full Circle. Passionate about automation scripting, end user experience and cloud technology.