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}}
More Stories
Running PowerShell Hyper-V and VMWare Modules
Extend the Evaluation Period on Windows Server
Now using Ansible, Chocolatey, Powershell