Hi All,
I am trying to inflate few specific vmdks of a VM.
I tried
Get-HardDisk -VM $vmname |Set-HardDisk -HardDisk "hard disk 1" -Inflate
this is not working, can you suggest what i am missing.
Thanks!
Vinod
The Harddisk parameter does not seem to do Object By Name (OBN).
Try it like this
Get-HardDisk -VM $vmname -Name "Hard disk 1" | Set-HardDisk -Inflate -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LuCD,- Thanks for the reply. I got below message after running the command
Get-HardDisk : A parameter cannot be found that matches parameter name 'Name'
Are you running PowerCLI 5 ? Do a
Get-PowerCLIVersion
If you can't do the upgarde right now, use this alternative
Get-HardDisk -VM $vmname | where {$_.Name -eq "Hard disk 1"} | Set-HardDisk -Inflate -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I was on 4.1, i upgraded to 5.
On 4.1 i ran the command and get message to connect to ESX host directly for the operation. But on 5 i am able to do without connecting to ESX host specifically.
Thanks again.
Vinod