shutting down PCs in batch

  • Thread starter Thread starter Reggie
  • Start date Start date
R

Reggie

Looking for an easy way to script the shutdown of
multiple PCs. PC names contained in a text file.

Any ideas?
 
Hi Reggie,

This vbs script will shut down a PC. (Warning, it will shut down, even
if you have programs running and_have not saved_documents in them!!)


Set wmi = GetObject("winmgmts:{(Shutdown)}")
set objset = wmi.instancesof("win32_operatingsystem")
for each obj in objset
set os = obj : exit for
next
os.win32shutdown (8)


Good luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top