October 23, 2021

USEFUL-IT

A blog for USEFUL-IT information

PowerShell Challenge 001 : VMQ state

POWERSHELL CHALLENGE 001 : VMQ State on Hosts
Using :

  • Windows Server 2012 R2
  • MicroSoft System Center Virtual Machine Manager 2012 R2

Challenge:

Show the state of VMQ on every host in your Hyper-V environment

  • Not intrested in the disabled state
  • Hosts in multiple SCVMM environments

I would like that the output looks like this.

PSComputerName Name enabled
————– —- ——-
Server001.usefullab.nl VM Team True
…
…

Extra challenge : One-Liner (Import-module line exluded)