Wednesday, October 15, 2008

nant tips and tricks - part #3 remote shutdown and remote execute

More nant examples to hopefully save you the effort!

Nant reboot remote computer
psshutdown.exe is part of the PStools kit from sysinternals (now Microsoft). The static timer at the end was an addition because it takes some time for the reboot request to take the machine down, even with the force option. I put the sleep in this task so my next task can immediately start checking for the server to be up and wait for it.

Nant launch a process remotely using psexec
In my last post, I mentioned the possibility of using psexec to launch remote programs. Here's a simple task example that does just that by launching ping on the remote computer.

No comments: