I'm trying to create a script to create a couple of GPOs with Powershell. I cannot easily add a reg key to set adv audit policies but I found where this information is stored in a policy. I am able to create the policy and then add a file with the necessary setting settings in it. When I run the script, I see my new policies but when I go to review the settings, it does not initially display the adv audit policy settings. When I edit one of the policies and navigate to the settings, I can see my settings in there. If I go in and alter any setting in there and then hit apply, then I am able to see all of the settings I have set. This may be hard to visualize so I did a small screen recording of it and converted it to a gif.
Here is a sample of the code I'm using. I've condensed by removing some of the adv audit settings and only putting...