Describe the bug
All AD objects modification ran by the .ps1 script on standard DC cannot be achieved since the TS is ran under LOCALSYSTEM(DC Identity) and this Id does not have any modification right on PDC.
To Reproduce
Steps to reproduce the behavior:
Deploy the GPO on any DC but PDC
Make the TS run by triggering it (moving AD Computer for ex)
See event viewer for failed action
Expected behavior
This script must work on any DC. We cannot deploy it centrally since the event ID needed to run the task are generated locally on DC.
Proposed Solution
Change all call to variable $myPDC to localhost
Describe the bug All AD objects modification ran by the .ps1 script on standard DC cannot be achieved since the TS is ran under LOCALSYSTEM(DC Identity) and this Id does not have any modification right on PDC.
To Reproduce Steps to reproduce the behavior:
Expected behavior This script must work on any DC. We cannot deploy it centrally since the event ID needed to run the task are generated locally on DC.
Proposed Solution Change all call to variable $myPDC to localhost