VMware Cloud Community
cleffingwell
VMware Employee
VMware Employee

PowerCLI help: Is ESXi host in Lockdown mode?

Need help in getting a script that will poll the ESXi (version 4.x) host and list whether it is in Lockdown Mode.

Thanks much!

Clint

Tags (2)
0 Kudos
4 Replies
LucD
Leadership
Leadership

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

JB204545
Contributor
Contributor

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.

0 Kudos
Dave_Mishchenko
Immortal
Immortal

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.

0 Kudos
JB204545
Contributor
Contributor

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.

0 Kudos