Information
Configuring virtual machines to lock upon closing the last console connection enhances security by mitigating the risk of unauthorized access via open console sessions. This configuration is particularly useful in environments where multiple users have access to the console. The parameter governing this behavior is tools.guest.desktop.autolock with the recommended setting being TRUE.
Implementing this control provides an additional layer of security by ensuring that open console sessions do not remain accessible after the last connection is closed, thus reducing the potential for unauthorized access.
Solution
The following PowerCLI command may be used:
Get-VM -Name $VM | Remove-AdvancedSetting -Name tools.guest.desktop.autolock
Impact:
No functional impact is associated with this control; it serves as a proactive measure to prevent unauthorized access through open console sessions.