Looking for some assistance on a simple SCVMM script. What I need is to get a list of all virtual machines on a particular VM Host but the script has to get this information from the SCVMM server.
Currently I can use the following and get all the virtual machines for all VM hosts on the SCVMM server:
However, how can I parse this information to grab only the virtual machines from a particular VM host rather than all of them?
Something like this:
$vm = Get-VM -VMMServer SCVMMServer -Name MyVMName
This may also work (I don't have the SCVMM cmdlets in front of me right now, that's on my todo list):
Get-VMHost -Name MyVMHostName | Get-VM
That last one really depends on how the cmdlets are designed.
You must be logged in to reply to this topic.