Enabling maintenance mode via esxcli
In the odd occasion when you need to enable this function from the CLI:
Enter maintenance mode:
esxcli system maintenanceMode set --enable true
Exit maintenance mode:
esxcli system maintenanceMode set --enable false