Windows Server domain environment sends scheduled tasks through Group Policy

Source: Internet
Author: User

1. AD domain Environment

2. Service version: 2008

Purpose: A scheduled task is sent to the client to restart periodically on a daily basis through Group Policy.


To restart the script content:

C:\WINDOWS\system32\shutdown.exe-r-T 60
@ @echo Off
Echo ******************* >>c:\scripts.log
echo "Reboot script is already running" >>c:\scripts.log
date/t >>c:\scripts.log
time/t >>c:\scripts.log
echo "reboot script run end line" >>c:\scripts.log

Echo ************************ >>c:\scripts.log
@ @echo on

The first sentence is: Restart the system after one minute

The remainder is the recording of the script execution time on the C-drive c:\Scripts.log.


1. Open the Group Policy manager on the leo.com server and create an organizational unit named "Test" on the established domain.

650) this.width=650; "title=" 11.jpg "style=" Float:none; "src=" http://s1.51cto.com/wyfs02/M01/89/20/ Wkiom1gib7gqvyrwaacbrnblvzo681.jpg-wh_500x0-wm_3-wmp_4-s_1973450017.jpg "alt=" Wkiom1gib7gqvyrwaacbrnblvzo681.jpg-wh_50 "/>

2. Create a new Group Policy "reboot" above "test"

650) this.width=650; "title=" 22.png "style=" Float:none; "src=" http://s1.51cto.com/wyfs02/M02/89/1D/ Wkiol1gib7ky4h6paahhc84sjuu590.png-wh_500x0-wm_3-wmp_4-s_4177964475.png "alt=" Wkiol1gib7ky4h6paahhc84sjuu590.png-wh_50 "/>

3. Select the new "reboot" Group Policy right-click on "Edit", open "preferences" control Panel settings "Scheduled Tasks" to start setting up scheduled Tasks



650) this.width=650; "title=" 33.png "style=" Float:none; "src=" http://s1.51cto.com/wyfs02/M00/89/20/ Wkiom1gib7ptqilkaai37ylazu4258.png-wh_500x0-wm_3-wmp_4-s_1161769867.png "alt=" Wkiom1gib7ptqilkaai37ylazu4258.png-wh_50 "/>

650) this.width=650; "title=" 44.png "style=" Float:none; "src=" http://s4.51cto.com/wyfs02/M00/89/1D/ Wkiol1gib7tggmddaaktbmfcny4317.png-wh_500x0-wm_3-wmp_4-s_3644507393.png "alt=" Wkiol1gib7tggmddaaktbmfcny4317.png-wh_50 "/>

650) this.width=650; "title=" 55.png "style=" Float:none; "src=" http://s5.51cto.com/wyfs02/M01/89/20/ Wkiom1gib7xdi-7uaaj91miih_4352.png-wh_500x0-wm_3-wmp_4-s_1319809801.png "alt=" wKiom1gIb7XDi-7uAAJ91MIIH_4352. Png-wh_50 "/>

650) this.width=650; "title=" 66.png "style=" Float:none; "src=" http://s2.51cto.com/wyfs02/M01/89/1D/ Wkiol1gib7wwuk5saaiqyjfafre534.png-wh_500x0-wm_3-wmp_4-s_933441508.png "alt=" Wkiol1gib7wwuk5saaiqyjfafre534.png-wh_50 "/>

Add the computer that you want to test on the ad user's computer to the test group

650) this.width=650; "title=" 77.png "style=" Float:none; "src=" http://s2.51cto.com/wyfs02/M02/89/20/ Wkiom1gib7bigboeaaec1wsrbi8080.png-wh_500x0-wm_3-wmp_4-s_4036457954.png "alt=" Wkiom1gib7bigboeaaec1wsrbi8080.png-wh_50 "/>

650) this.width=650; "title=" 88.png "style=" Float:none; "src=" http://s1.51cto.com/wyfs02/M02/89/1D/ Wkiol1gib7asrspjaaek5nyvccc024.png-wh_500x0-wm_3-wmp_4-s_2536291225.png "alt=" Wkiol1gib7asrspjaaek5nyvccc024.png-wh_50 "/>

In leo-pc, manually update the policy cmd input gpupdate/force

See if the policy is in effect.


Windows Server domain environment sends scheduled tasks through Group Policy

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.