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.

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

wvsandwijk

I am a Technical Specialist - Cloud Infrastructures from the Netherlands.
My Skills are mainly PowerShell, VMWare, Hyper-V, Microsoft System Center products and Windows Azure Pack.

I work for a company in Utrecht The Netherlands.

1 Comment

Add a Comment
  1. Possible answer :

    “VMMServer001”,”VMMServer002″| Foreach {Get-SCVMHostCluster -VMMServer $_ | Get-scvmhost | foreach {Get-NetAdapterVmq -CimSession $_.Name} | Select PSComputername,Name, enabled | Sort-Object PSComputername | Where {$_.Enabled -eq $true}}

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.