Help with Shutdown policy
Hi,
I work in a network with 250 client machines. The machines are locked down so that users can only log of from within the desktop. We perform some software installs using Group Policy and updates are provided by WSUS. I have been trying to find a suitable solution so that the machines can be rebooted out of hours. I have found that you can create a powerdown.bat file that can be used in conjunction with a schedule task that I will run from my machine.
the command is shutdown /r /m \\nbscorp453
I will run this against all the client machines and schedule a task to run it out of hours. I think this will be suitable but I wanted to check if anyone does it differently. I was also interested to see if I could integrate this within AD. Possibly setting up a reboot group that I can add the machines to or if I can associate the script to an OU specifying a time for the script to run. If anyone knows of a better way or how to integrate it into AD that would be much appreciated.
I work in a network with 250 client machines. The machines are locked down so that users can only log of from within the desktop. We perform some software installs using Group Policy and updates are provided by WSUS. I have been trying to find a suitable solution so that the machines can be rebooted out of hours. I have found that you can create a powerdown.bat file that can be used in conjunction with a schedule task that I will run from my machine.
the command is shutdown /r /m \\nbscorp453
I will run this against all the client machines and schedule a task to run it out of hours. I think this will be suitable but I wanted to check if anyone does it differently. I was also interested to see if I could integrate this within AD. Possibly setting up a reboot group that I can add the machines to or if I can associate the script to an OU specifying a time for the script to run. If anyone knows of a better way or how to integrate it into AD that would be much appreciated.
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□Is this just for WSUS updates or something else as well? Why don't you schedule the installation for the time you want and allow the machines to automatically reboot if necessary?
-
cjthedj45 Member Posts: 331 ■■■□□□□□□□dynamik wrote:Is this just for WSUS updates or something else as well? Why don't you schedule the installation for the time you want and allow the machines to automatically reboot if necessary?
Hi Dynamik,
The issue I'm having is more to do with a when I install software using GPO. The machines will need to reboot for the policy to update and the software to be installed. So for example if I install an msi today using Group Policy then the user need to reboot so that the software cna install. Ideally I would like to schedule this out of hours so that when they come in to work in the morning the software is there.
Thanks -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□I've advised the use of the "for" command so many times I sound like a broken record, but this is another case where it will work well.
Let's say you assign an MSI install via GPO for a certain OU. You can create a text file of all computers in that OU by selecting ACTION>EXPORT LIST. Then you pull the list into a spreadsheet using the Get External Data function, delete all the columns except the computer name column, then copy and past that back into your text file (2 minutes work so far). Save the text file as computernames.txt or something.
Now run your shutdown command as follows:
for /f %C in (c:\temp\computernames.txt) do shutdown /r /m \\%C
If you make this a batch file use double percent symbols before the variable (%%C).All things are possible, only believe.