Closed JasonP7600 closed 2 years ago
I think I have found the issue here. I am using Horizon 7.13, which has to have 2 arguments passed. The method actually wants 2 arguments, even though the API says that filterIncompatibleVms is set to false, but there is a note for 7.13 there that not specifying a value it should be set to false so you still need to put that boolean variable in, or set to null. eg: BaseImageVM.BaseImageVm_List($vCenterid,$true) or BaseImageVM.BaseImageVm_List($vCenterid,$null)
In the Helper script only 1 argument is passed and that is the vCenterID and nothing else, hence the reason why the command fails. from the helper script on of the lines that will fail. $BaseImageVMList = $services.BaseImageVM.BaseImageVM_List($VirtualCenterId)
The scripts need to be updated to accommodate for 7.13 users.
Isn't this just the same as the issue in #397 ?
Yip ... it looks like it is ... I did not see that before I posted this initial one
I’ve got a fix for you, based on #397. Added some code too.
Waiting for approval..
When trying to run Get-HVBaseImageVM I constantly get : MethodException: C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:7260 Line | 7260 | $BaseImageVMList = $services.BaseImageVM.BaseImageVM_List($Virtua … |
~~~~~~~~~~~~~| Cannot find an overload for "BaseImageVM_List" and the argument count: "1".When trying this in PS version 5 I get the same issue. I tried this by looking into the helper.psm1 file: PS C:\Windows\system32> $VirtualCenterId = Get-HVvCenterServer | Select-Object -First 1 -ExpandProperty Id PS C:\Windows\system32> $BaseImageVMList = $services.BaseImageVM.BaseImageVM_List($VirtualCenterId) Cannot find an overload for "BaseImageVM_List" and the argument count: "1". At line:1 char:1