Windows Server 2019 Group Policy Not Effective

Charles 0 信誉分
2024-06-29T03:44:25.8133333+00:00

I want to set up a user based group policy that requires users to execute a script before logging into the computer.

My settings are as follows:

User's image

The content of this bat script is as follows:

User's image

I use ctrl+alt+del to lock the computer and log in to the current user again,I didn't see the result of executing the bat script:

User's image

Execute gpresult /v on the client side:

User's image

But after logging out of the user, I can see the script execution results,So the user policy here can only take effect after logging out the user?

Windows 商业版 | Windows Server | 用户体验 | 其他
0 个注释 无注释
{count} 票

1 个答案

排序依据: 非常有帮助
  1. Yanhong Liu 14,305 信誉分 Microsoft 外部员工
    2024-07-01T06:36:44.78+00:00

    Hello,

    Thank you for posting in Q&A forum.

    Based on your description, this issue you are experiencing may be due to the following reasons.

    Group Policy is applied when a user logs on or off and when the computer starts up or shuts down. Therefore, if you lock the computer and then log back on, Group Policy might not be applied because it's not a full logoff and logon cycle.

    If you want Group Policy to update immediately, you can try using the "gpupdate /force" command in the command prompt to force the Group Policy update.This may help you.

    gpupdate | Microsoft Learn

    Refresh Group Policy | Microsoft Learn

    If your Group Policy application fails, this document may be helpful to you.

    Applying Group Policy troubleshooting guidance - Windows Server | Microsoft Learn

    I hope the information above is helpful.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 个注释 无注释

你的答案

提问者可以将答案标记为“已接受”,版主可以将答案标记为“已推荐”,这有助于用户了解答案是否解决了提问者的问题。