When using IIS 7 you could also make use of Powershell provider ... that could be much easier ... The only command you need to know is Restart-WebItem
Restart-WebItem DefaultAppPool
Provided you have the IIS snap-in running on the machine....
Regards,
MA Khan
http://www.iisworkstation.com“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”