Thanks, that is what I need any chance you could post an example of the usage.
Tthe VIevents tell me at some point the systems triggered one of these events, but not the current state of the system. There may be a simple soution with a script to compar the Key to get this information but can this also be done via Command line or does it need to be scripted.
get-vmhost HostName |Get-VIEvent |where {$_.FullFormattedMessage -match "maintenance mode"}
EventTypeId : esx.audit.maintenancemode.entered
FullFormattedMessage : The host has entered maintenance mode.
EventTypeId : esx.audit.maintenancemode.entering
FullFormattedMessage : The host has begun entering maintenance mode.
Thanks,
Paul