Hi,
Am getting below error
Get-HardDisk : Cannot validate argument on parameter 'VM'. The argument is
null. Provide a valid value for the argument, and then try running the command
again.
At C:\users\test\Desktop\test.ps1:11 char:25
+ if((Get-HardDisk -VM $_ | %{$hdNames -contains $_.FileName}) -notc ...
+ ~~
+ CategoryInfo : InvalidData: (:) [Get-HardDisk], ParameterBindin
gValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutom
ation.ViCore.Cmdlets.Commands.VirtualDevice.GetHardDisk