Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a pfsense machine which I am trying to shutdown when the main server running Win2k8 is shutdown.

I have created a batch file with this command:

E:\plink\plink -ssh -P 22 -pw mypassword root@192.168.1.1 "/sbin/shutdown -p now"

It is just one line and nothing else is required to be done. I tested the batch file (ran it by double-clicking) and it worked successfully.

I saved it as "firewallshut.bat" and associated the same with shutdown command (via GPEDIT.msc) by adding it on the "scripts" tab. It is copied to the required folder (C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown). However, when the system is shutdown, the script (batch file) doesn't work at all and on top of that it pushed the server into a waiting mode ("Waiting for Group Policy Update Client"). I waited for a long period and then had to power-off the server.

I am thinking of adding "exit" command to the file. Will that be sufficient or am I missing something else? If this doesn't work, I will have to do a hard shutdown again and hence I am reluctant to test it.

Thanks

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.