- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran that script mate and got the below, for clarity the drives on the VM's are already 40GB. Can I confirm this does extend the drive rather than nuke it and replace it with a larger one? ... If I change the value to 41GB however its works great, just a tad worried I might lose data however if I run it on production. Thanks however mate, feel free to educate me and let me know how I was being a newb with this one.
Set-HardDisk : 16/04/2018 11:03:56 Set-HardDisk The specified size '20971520' is less than actual size of the
virtual disk '41943040'. At H:\Handy PowerCLI Scripts\IncreaseDiskXXGB\IncreaseDisk120GB.ps1:16 char:4
+ Set-HardDisk -CapacityGB ($_.CapacityGB + 20) -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-HardDisk], InvalidArgument
+ FullyQualifiedErrorId : Client20_VirtualDeviceServiceImpl_TryValidateHardDiskNewSize_InvalidSize,VMware.VimAutomation.V
iCore.Cmdlets.Commands.VirtualDevice.SetHardDisk
Set-HardDisk : 16/04/2018 11:03:57 Set-HardDisk The specified size '20971520' is less than actual size of the
virtual disk '41943040'. At H:\Handy PowerCLI Scripts\IncreaseDiskXXGB\IncreaseDisk120GB.ps1:16 char:4
+ Set-HardDisk -CapacityGB ($_.CapacityGB + 20) -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-HardDisk], InvalidArgument
+ FullyQualifiedErrorId : Client20_VirtualDeviceServiceImpl_TryValidateHardDiskNewSize_InvalidSize,VMware.VimAutomation.V
iCore.Cmdlets.Commands.VirtualDevice.SetHardDisk
Set-HardDisk : 16/04/2018 11:03:59 Set-HardDisk The specified size '20971520' is less than actual size of the
virtual disk '41943040'. At H:\Handy PowerCLI Scripts\IncreaseDiskXXGB\IncreaseDisk120GB.ps1:16 char:4
+ Set-HardDisk -CapacityGB ($_.CapacityGB + 20) -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-HardDisk], InvalidArgument
+ FullyQualifiedErrorId : Client20_VirtualDeviceServiceImpl_TryValidateHardDiskNewSize_InvalidSize,VMware.VimAutomation.V
iCore.Cmdlets.Commands.VirtualDevice.SetHardDisk