Hi,
Have some issues getting this working (4.1 u1); I was wondering if some soul could help.
Remove-HardDisk -whatif -confirm $false -HardDisk (Get-HardDisk -VM vTest2 | ?{$_.Name -eq "Hard disk 2"})
This is my code at the moment (above), I am trying to get the -confirm set to $false as per document: http://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Remove-HardDisk.html
I can get it working just fine without the -confirm $false, but it prompts me for a 'are you sure y/n' type dialouge; as I need to run this in a script I have to disable the confirmation. Please can someone help me out with what I am missing?
For reference I pulled the code from here:
http://communities.vmware.com/thread/315086
Thanks!
Leon.