Welcome to ServerForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Restart with VBS

 
   Windows Server (Home) -> Windows Server Scripting RSS
Next:  Need to Refresh Start Menu From WSH  
Author Message
Raffael Maio

External


Since: Oct 03, 2003
Posts: 1



(Msg. 1) Posted: Fri Oct 03, 2003 5:46 am
Post subject: Restart with VBS
Archived from groups: microsoft>public>windows>server>scripting (more info?)

hello,
i have a problem to do a vbs scrpit who can reboot my
machine.

I have make a script like that:
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" )
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next

When i execute the script when i'm log, they restart work
perfectly. But when i execute it with Ghost in command
mode, they don't work !!

Have somone to make a reboot with delay ?! Or for forcing
reboot ?

 >> Stay informed about: Restart with VBS 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
restart computer - Can this script reboot computer across subnet? strComputer = inputbox"Enter PC name" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\ci...

restart computer - hello, anyone have any idea why i get this error when i try run this vbs? this script allow restart a computer strComputer = "computer" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,(Shutdown...

restart error - Does anyone know anything about how to solve this problem? THE DRIVE OR NETWORK CONNECTION THAT THE SHROTCUT 'RESTART_VS.INK' REFERS TO IS UNAVAILABLE. MAKE SURE THAT THE DISK IS PROPERLY INSERTED OR THE NETWORK RESOURCE IS AVILABLE, AND THEN TRY....

Schedule restart for 2000 server - Please Help - I need to schedule my 2000 servers to restart daily. Ive tried this script (found here) strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComput...

Schedule Restart and auto login - I have a win2k machine that I have successfully scheduled to restart. I have also managed to schedule the auto executing of a program after it starts. However, I cannot get past the part about the ALT, CTRL, DEL and then logging into the maching. ....
   Windows Server (Home) -> Windows Server Scripting All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]