I am trying to add Hyper-V host to Move to migrate the VMs.
But after adding the host, VM inventory are not loading(Shows 0 VMs) . When i try to refresh i get below error:
Failed to get inventory for source ' '. .ApiName="Get VM", HypervisorErr="=Cmd="Get-VM | Select-Object -ExpandProperty DVDDrives | Select ControllerType, ControllerNumber, ControllerLocation, Path, SupportPersistentReservations, VMName, VMId | ConvertTo-Json -Compress | Out-File -FilePath C:\Users\xtract\AppData\Local\Temp\executeCmd385362813\Ouput.json", ErrorMsg="exit status 1", Location="/root/workspace/xtract_vm_qcow2_builder_prod/go/src/hypervisor/hyperv/hyperv_agent/utils.go:96", Stderr="#< CLIXML <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><S S="Error">Get-VM : The term 'Get-VM' is not recognized as the name of a cmdlet, function, script file, or _x000D__x000A_</S><S S="Error">operable program. Check the spelling of the name, or if a path was included, verify that the path _x000D__x000A_</S><S S="Error">is correct and try again._x000D__x000A_</S><S S="Error">At line:1 char:1_x000D__x000A_</S><S S="Error">+ Get-VM | Select-Object -ExpandProperty DVDDrives | Select ControllerT ..._x000D__x000A_</S><S S="Error">+ ~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : ObjectNotFound: (Get-VM:String) )], CommandNotFoundException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CommandNotFoundException_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>"] Powershell command failed on HyperV machine. (error=0x8008)", Location="/hermes/go/src/hypervisor/hyperv/hyperv_agent_impl.go:1309"] Failed to execute Hyper-V API. (error=0x8001)