Answer the question
In order to leave comments, you need to log in
How to properly troubleshoot problems with GPO scripts?
Good day! I'm using a GPO cmd script to hang a heavy program, it takes about 10 minutes, but that's not the point, subject:
Desired result: Distribute the program through GPO in bakeries.
Actions taken: Wrote a script that checks for the presence of a folder with an installed program, if it exists, it closes, if not, it starts the installer with silent installation keys. Manually, the script works well - the check goes correctly, the installer starts, installs and closes.
I put in the GPO in the computer policy on the autorun script. The policy is applied, the script works, but now I turn on the PC, I go in and see in the manager: The installer process starts, which hangs there for 10-20-30 minutes, eats 3 meters of opera and does not move further. On other machines everything is ok. Unable to understand why things are not moving on this machine, I came across the idea that I am weak in such troubleshooting :/ Tell me, good people, what else can be done here?
Answer the question
In order to leave comments, you need to log in
I'm stupid okazts, it was in the security policies - it was not possible to verify the publisher. Chet thought that since it is installed from the system account - it bypasses all these checks,
thanks to everyone
There are several approaches to this issue:
1. Computer Configuration \ Policies \ Administrative Templates\ System \ Logon\ “Always Wait for the Network at Computer Startup and Logon” Enable
2. Computer Configuration \ Policies \ Administrative Templates\ System \ GPO Processing wait time = (30 sec)
Didn't help?
1. Rewrite the script in PowerShell, put Start-Trascript at the beginning, Stop-Transcript at the end. This will give you an understanding of how the script itself works. Perhaps he swears at some things, but you cannot see it
For both cases:
The application of the policy itself can be checked with gpresult /r You will see what was applied, what was not.
Go to eventvwr, go to Aplication and Services Logs - Microsoft - Windows - Group Policy.
If the log is off, turn it on and see what happens.
For the test, you can move the workstation to a separate OU, link one policy with a script there and enable Block Inheritance on the OU
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question