Script to take hosts out of maintenance mode in vCenter & vROPs

On occasion, I’ve noticed that people can sometimes forget to take a host out of maintenance mode in vROPs after completing some work in vCenter. I have created a short PowerCLI script that will pull a list of hosts from a specified CSV file, connect to your vCenter & vROPs then exit the listed hosts

Loading

Check host domain membership

Quick one line list all host in a cluster and display their domain membership status Get-Datacenter $global:DCChoice | Get-Cluster $global:CLUChoice | get-vmhost | Get-VMHostAuthentication | select -Property VMhost, @{N=”Domain”;E={$_.vmhost.Domain}},@{N=”DomainMembershipStatus”;E={$_.vmhost.DomainMembershipStatus}}

Loading