Ajay Pathak
asked on
powershell script for expanding c drive in Vmware VM and extending the disk in same script
Can anyone help in extending the c drive:disk1 in vmware VM and extending the c drive in same script.
I am able to extend the disk via powercli with oneliner script but challenge is extending the c drive in windows without using diskpart diskmgmt.
Thanks
I am able to extend the disk via powercli with oneliner script but challenge is extending the c drive in windows without using diskpart diskmgmt.
Thanks
ASKER
Thanks Andy. I need to extend the c drive for multiple VMs on ESX.majority of these hosts are 2008 and I need a script for carrying on this task along with extending the disk
Personally, we would do it manually, and check all is okay, and make sure you have a full backup before you attempt this, as re-sizing often goes wrong in the OS. (not a snapshot!).
We would never attempt to write a powershell script to extend the disks, and OS partitions, that is asking for trouble, as so much can go wrong, and usually does manually, and then we only ever re-size a disk, by checking the existing resources, e.g. datastores, are not going to be low, e.g. less than 25-30% storage space.
We would never attempt to write a powershell script to extend the disks, and OS partitions, that is asking for trouble, as so much can go wrong, and usually does manually, and then we only ever re-size a disk, by checking the existing resources, e.g. datastores, are not going to be low, e.g. less than 25-30% storage space.
I can only agree to that. I would not try to automate this action, at least not without including the backup - and that requires you to mix up outband and inband PowerShell code, making ti more complex than it is worth it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Get-PartitionSupportedSize
What is your OS?