Issue with Logon script (power shell) on the domain Windows Server 2022

PerserPolis-1732 1,841 Reputation points
2024-07-30T13:40:06.17+00:00

Hi,

I have a issue with Power shell script for Logon script on the Windows domain server 2022.

I have created a OU named "maintest" and under OU "maintest", I created OU "test1", "test2", "test3", "test4"

it see so on my domain

User's image

I have created now under OU "maintest" a GPO named "flush" on the right site in "Details" I notify the Uniquee ID {CD65F038-T690-4A81-3938-AF755DF1516Z}

User's image

I copied my power shell script (pw.ps1) on the following folder

\conto\SYSVOL\local.com\Policies{CD65F038-T690-4A81-3938-AF755DF1516Z}\User\Scripts\Logon

then add the my power shell script here too

User's image

The Policy should be now applied for all the OUs OUs "test1", "test2", "test3", "test4"

the GPO policy does not work on the client. What is here wrong?

Regards

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,799 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,239 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,931 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Daisy Zhou 25,296 Reputation points Microsoft Vendor
    2024-07-30T14:45:25.67+00:00

    Hello PerserPolis-1732,

    Thank you for posting in Q&A forum.

    1.Please check the PS script itself works fine when you run it manually.

    2.Please make sure you put AD domain user accounts into **"maintest"**and its child OU "test1", "test2", **"test3"**and "test4", because it is user configuration.

    3.Please sign in one Domain user account in OU "maintest" on one client and sign out this account and sign in the same domain user account again and check if the script runs.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

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

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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.