July 28, 200422 yr Hello all. I am trying to write a script that will reboot my 50 pc's once a month in an authenticated domain. I have been using the psshutdown tool from sysinternals but I cannot get it to work when regular users are logged onto the PC. All users have no access on the PC's Any help will be greatly appreciated.
July 28, 200422 yr Author I have tried this but when I use the AT command it does not run on the PC at the time that I have specified. This is what I have AT 14:00 every:Th shutdown.exe /l /r /t:120When the PC is logged on as any of the users this command does not run.
July 29, 200422 yr Hmm, strange...Well, it may be a pain, but you could set the windows task schedulers on each system to run a shutdown script. That should work no matter how people are logged on.
July 29, 200422 yr Author Is there a way to do this once and send it out to all machines? The PC's are in different cities.
July 29, 200422 yr u could make a script that would set the appropriate reg entries & start task scheduler, ive never done this, but it sounds logical
July 29, 200422 yr I've been looking at the help for at, and i read that you may need it to be interactive, /interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs.but i don't see this in your command? so I'm guessing that those after shutdown.exe are specific for it.Useless hint, if you can get the command to work on your PC, then you know it works, so I'm also assuming it does work on your PC and not the remote ones?sorry, if on a tangentEDIT: with ref to MCT, as the at id's are stored in the registry, this would make perfect sense.
July 29, 200422 yr Author It still did not work. And here I thought that this would be failry easy. So much for that school of thought.................
July 29, 200422 yr Ok, so does the command work on your pc?Try just opening a command prompt and typing<PATH>shutdown.exe /i /r /t:120does this work?If not, then get this fixed first. Once this is working start looking at adding a schedule to it.easiest way to know all switches is to open a command prompt and type at /?Will try when home,(currently at work), and see if I can help more.
July 29, 200422 yr Author Yes this path works. I can evern create the task with the /interactice switch but when I am loged on as a user as you know it does not launch. I can then go to the taskmanager screen and it seems that all that is missing is the password for this task. Is there a way that this can be installed with elevated privileges in order to run?
July 30, 200422 yr I read somewhere that due to a limitation in WinXP, scheduled tasks don't run if the user doesn't have a password. I guess you might check to see if the user has one maybe?Also, in WinXP you can use the schtasks command, which creates events the same way that one would create them in the tak sceduler (they show up there and everything). I think that its a bit more advacned than AT, but I could be wrong.
August 4, 200422 yr Author Yes I have been working with the schtasks command but this is where my novice skills show thru. This is what I want to accomplish on each computer remotely. I want to write a schtasks file like this one. c:cd\schtasks /create Reboot /tr reboot.bat /sc 500 /ru system
August 6, 200422 yr There is a known issue in Windows 2003 Server in which shutdown.exe will not properly shutdown a system from a batch file if the system has been accessed via an RDP connection since its last reboot. Microsoft states that you cannot shut it down remotely, be we found we could not even use shutdown.exe in a scheduled script. The exact behavior that we saw, and that documented by Microsoft vary slightly, but the fix resolved our problems. It wouldnt surprise me if this issue exists in Windows XP as well, but hasn't been identified or fixed. http://support.microsoft.com/default.aspx?...kb;en-us;834100The hotfix for Windows 2003 Server cannot be directly downloaded from Microsoft, but can be requested via email. We have slipstreamed this hotfix into our automated build. Unfortunately, this patch replaces winlogon.exe, so it won;t work with Windows XP.
Create an account or sign in to comment