When you're using PowerCLI 4.1 you can do
Get-VMHost <hostname> | Select Name,@{N="Lockdown";E={$_.Extensiondata.Config.adminDisabled}}
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Command worked great when using the virtual center name as the hostname but is there a way to find the ESXi host in lockdown mode when they are not managed by virtual center? PowerCLI is disabled on ESXi host running in lockdown so there would be no way to run this command.
Welcome to the VMware Communities forums. You could check in the DCUI to see if the host is in lockdown mode, but otherwise any API method will return an error (I suppose you could parse the error message to see if lockdown mode is potentially enabled).
Dave
VMware Communities User Moderator
Forum Upgrade Notice - the VMware Communities forums will be upgraded the weekend of December 12th. The forum will be in read-only mode from Friday, December 10th 6 PM PST until Sunday, December 12th 2 AM PST.
Now available - VMware ESXi: Planning, Implementation, and Security
Also available - vSphere Quick Start Guide
Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.
Thanks Dave, I was thinking the same thing but not sure how to output the error messages to a file in powercli. DCUI will not work as I have a few hundread ESXi servers to check.