次の方法で共有


SCVMM 2008 /R2 Get-VMHost sometimes does not returning full list of VMs

This one is rather interesting, Came across an issue where when we call get-vmhost.one of the property of the VMHost is the VMS, which is esentially the list of VirtualMachines running on host.

Apparently the List is not completely populated. Apparently this might happen if the VM propeties are not fully cached. To fix this simply make a call to get-vm and you should be good to go.

 

So if your powershell looked like this.

------------------------------------

Get-Vmmserver localhost

Get-VMhost | format-table-property name,vms -autosize

------------------------------------ 

Ensure you make a call to get-VM befor the get-VMHost is called.

------------------------------------

 Get-Vmmserver localhost

$tempcache=Get-VM

Get-VMhost | format-table-property name,vms -autosize

------------------------------------ 

I hope you found this information useful.

Regard

Jeevan S Bisht