Howdy. I cannot find any documentation on this, so I assume it is likely impossible. If one wanted to query info from one WMI class (like, say, if a user is logged) in WMIC and then call a method from another (like rebooting if a user is not logged), can one even do this?
Yes, I know: this is best handled as a script. I am looking for a quick one-liner for when I need to patch things in a lab quickly. I want combine these two in particular:
If (wmic computersystem where username=null call) -> wmic os call reboot
So, it would look in my mind:
wmic computersystem where username=null call (syntax here to call reboot method from os alias)
Now, just so we are all on the same page, I am aware there are some cheapish hacks to do this, like linking commands with && and findstr looking for the No instances available message, but I am very curious if one can combine classes this way. WMIC has become the only thing MSFT developed that I like, and I would love to find out it that much more powerful for me.