I have a quick and probably simple question. I am definitely a powercli/powershell noob...just fyi
Anyway I am trying to pipe vms to "get-wmiobject win32_computersystem" however I am getting different errors
the effect I am trying to achieve would be if I just did a
get-wmiobject win32_computersystem -computername server1
But obviously with more VMs
My latest and most successful line is
get-vm|%{get-wmiobject win32_computersystem -computername $_.name}
even going so far as to try
get-vm|?{$_.PowerState -eq "PoweredOn"}|%{get-wmiobject win32_computersystem -computername $_.name}
However with some of the returns being what I want I get several errors as well.
I am sure this is something simple and if someone could point me in the right direction I would greatly appreciate it
Thanks!!
Conrad
www.vnoob.com |
@vNoob |
If I or anyone else is helpful to you make sure you mark their posts as such! 🙂