Hi StaticRavi,
It depends on where you operate this command line. If it is on the ESX console itself, I'm quite sure you can't do it. That's a big issue when you want to put a host in maintenance mode, you need to evacuate the running VMs from a remote console.
If you are on a remote administration machine, you can use one of the SDKs. For example, you can have a look at this script.
Good luck.
Regards
Franck