Windows Server 2019/ 2016 GPO - User Logon Powershell

Will 616 Reputation points
2020-08-16T08:16:02.073+00:00

Hey there,

I attempt to config GPO to add a Registry data in Client desktop when user login to the Domain. my Server is windows server 2019 and 2016, my client is windows 10. normally it is simple thing, but I face the problem. I found out an article on the internet (http://woshub.com/running-powershell-startup-scripts-using-gpo/) and then follow it in my environment. Unfortunately, it turns out all settings are not applied to client's desktop when the user is belonged to Domain Users not in Domain Admins/ Administrators Group. I mean the user is belonged to Domain Admins/ Administrators Group, everything works well. my question is there is any solution on it could let me solve it out ASAP?

My scenario is when you logon the domain, will be applied new GPO and PowerShell will put a data into client's registry.

Thanks

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,484 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,805 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,391 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,211 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Youssef Saad 3,401 Reputation points
    2020-08-16T09:51:57.267+00:00

    Hi,

    Why not deploy directly a GPO that make the desired changes instead of using PS script ?

    17748-gpo.jpg

    Regards,

    Youssef Saad

    1 person found this answer helpful.
    0 comments No comments

  2. Fan Fan 15,301 Reputation points Microsoft Vendor
    2020-08-17T01:36:49.99+00:00

    Hi,

    Based on my understanding , if the powershell script is the change the registry , the users need the permission . And in a Logon script, we can't modify the permission.
    You can considered to use a task schedule GPO to do this or consider the method YoussefSaad provided.
    For more details you can refer to the following link:
    https://learn.microsoft.com/en-us/answers/questions/66387/running-powershell-startup-logon-scripts-using-gpo.html
    Best Regards,