其他分享
首页 > 其他分享> > GPO Schedule Task CMD Command

GPO Schedule Task CMD Command

作者:互联网

GPO Schedule Task CMD Command

open “Group Policy Management”->Domain
Right click xxx.com to select “Create a GPO in this domain,and Link it here” ->Fill in a name such as test123->OK
Edit the test123->User Configuration->Preferences->Control Panel Settings->Scheduled Tasks
在这里插入图片描述
New->Schedyked Task(At least Windows 7)
在这里插入图片描述
Fill in a name such as “test cmd” ,choose “Run only when user is logged on”,Click OK.

在这里插入图片描述
Add Triggers
在这里插入图片描述
Select “at log on” to trigger when the user logs in successfully.
在这里插入图片描述
Add Actions

在这里插入图片描述
Progra,/script : Process path used

C:\Windows\System32\cmd.exe

Add arguments : Command to be executed

/C netsh int ipv4 set global sourceroutingbehavior=drop

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
update computer Policy(If you don’t press this command, the computer can also update automatically after a period of time)
在这里插入图片描述
After configuration, you can find “test cmd” in task scheduler
在这里插入图片描述
Note: when applying the configuration to the user machine, you need to add the new policy to the same identity classification as the user machine,such as

在这里插入图片描述

在这里插入图片描述

Test whether the configuration is successful

On the user machine that has been logged in again->open “regedit.msc” -> open path在这里插入图片描述
-DisableIPSourcerRouting value is 2, the configuration is successful.
在这里插入图片描述

标签:GPO,cmd,Add,Task,Command,user,configuration
来源: https://blog.csdn.net/baobaoyu_/article/details/113944846