I have a Windows 2008 Server virtual machine which has had its virtual hard disk expanded. Now I need to expand the partition inside the operating system. What is the simplest way to expand a windows partition in Windows 2008 Server with powershell?
Only reliable way I’ve found is to use diskpart
Is it possible to script the use of diskpart - for example to call diskpart from a powershell script, and tell diskpart to expand disk 0 partition 1 by the maximum amount possible?
You can call diskpart from with PowerShell
the syntax is explained here