POWERSHELL CHALLENGE 002 : ClusterReservestate

PS Challenge

Show the state of the ClusterReserveState on every Cluster in our Hyper-V environment

All Hosts in all Environments

I would like that the output looks like this.

Name ClusterReserveState
---- -------------------
Server001.usefullab.nl OK
Server002.usefullab.nl OK

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

Solution :

Import-Module virtualmachinemanager

'VMMServer001','VMMServer002' | foreach {Get-SCVMHostCluster -vmmserver $_} | Sort-object Name | Select Name, ClusterReserveState, ClusterReserve, @{label="NodeCount";expression={$_.nodes.count}}


About the Author


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.

No Comments

Comments are closed.