Shutdown a windows PC from linux



A remote Windows PC can easily be shutdown, assuming you have Samba installed on your Linux box, and you have a user account on the Windows PC that has the necessary rights.

Just enter the following command, where 'thehostname' is the hostname of the remote PC, and 'theusername' is a valid user account on the remote PC:
net rpc shutdown -S thehostname -U theusername
If the hostname is not known, or cannot be resolved, then use the following instead, replacing '111.111.111.111' with the IP address of the remote PC:
net rpc shutdown -I 111.111.111.111 -U theusername
Additionally, the parameters that can be used with Windows' own shutdown command such as '-f' to force or '-t' to set a timeout, can also be applied to the net rpc shutdown command as well. For example the following will wait 60 seconds, and then force all running programs to terminate before shutting down:
net rpc shutdown -S thehostname -U theusername -f -t 60


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

2 comments:

bzfuture said...

This is really nice post, I found and love this content. I will prefer this, thanks for sharing. windows 10 download.

mahnoorburi said...

Des niveaux de confiance plus élevés conduisent à une plus grande autonomie et autonomisation des employés, ce qui a renforcé la vision actuelle de la direction selon laquelle la confiance et l'efficacité organisationnelle sont étroitement liées. Les entreprises avec des niveaux de confiance et d'autonomisation plus élevés ont bénéficié d'une implication plus intensive des employés et ont ainsi obtenu des produits de meilleure qualité (2007). photoshop crack

Post a Comment

Popular Posts