Every time I have to put ESX(i) hosts into maintenance only by means of command line I have some kind of blackout which ends in "googleing" for proper syntax.
It is high time to finally remember how to put ESX(i) host into maintenance mode from command line:
For ESX Host:
vmware-vim-cmd hostsvc/maintenance_mode_enter
vmware-vim-cmd hostsvc/hostsummary | grep inMaintenance
vmware-vim-cmd hostsvc/maintenance_mode_exit
For ESXi Host:
vim-cmd hostsvc/maintenance_mode_enter
vim-cmd hostsvc/hostsummary | grep inMaintenance
vim-cmd hostsvc/maintenance_mode_exit
Hope putting it down will help at least for some time...:)