Syed Jahanzaib Personal Blog to Share Knowledge !

March 29, 2010

*nix: Howto Shutdown Remote MS AD Server/Clients

Filed under: Linux Related — Syed Jahanzaib / Pinochio~:) @ 7:21 AM

Following is a script I created to remotely shutdown the remote Microsoft AD Server / Member Server’s & Clients.
=================================================

[root@gw /]# cat zshut

#shutting down microsoft AD Member Server / Applicaiton Server’s / client Pc (shutdown AD in last)

net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.1
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.2
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.3
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.4
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.5
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.6
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.7
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.8
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.9
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.10
net rpc shutdown -t 10 -f -C “IT Shutdown Timer” -W zaib.com -U “administrator%AD-admin-pwd” -I 192.168.100.11

# shutting down local linux system . . ,
shutdown -h -P now
shutdown -h now

[root@gw /]#

%d bloggers like this: