Executing Scripts Via Configuration or Software Deployment
I've had issues with a configuration script that is no longer working. It could have been due to the upgrade to version 10 of DC or a UAC group policy.
- Computer Configuration/Policies/Windows Settings/Security Settings/Local Policies/Security Options/User Account Control
The full policy is this:
- User Account Control: Admin Approval Mode for the Built-in Administrator account Enabled
- User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop Disabled
- User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode Prompt for consent for non-Windows binaries
- User Account Control: Behavior of the elevation prompt for standard users Prompt for credentials
- User Account Control: Detect application installations and prompt for elevation Enabled
- User Account Control: Only elevate executables that are signed and validated Disabled
- User Account Control: Only elevate UIAccess applications that are installed in secure locations Enabled
- User Account Control: Run all administrators in Admin Approval Mode Enabled
- User Account Control: Switch to the secure desktop when prompting for elevation Disabled
- User Account Control: Virtualize file and registry write failures to per-user locations Enabled
The script is this:
- Robocopy \\file1\ejgmgmt\ejgmgmt_working c:\ejgmgmt_working /B /E /V /NP /R:4 /W:15 /LOG+:c:\ejgmgmt_logs\robocopy.log
I've used it as a powershell and batch script before and it worked fine. It will copy the contents of the first folder into the second folder and write a log. I can run the commands manually on the command line from the machine I am trying to run it on but when I run the configuration from DC, it fails with this error:
- 2016/12/17 11:09:24 ERROR 5 (0x00000005) Accessing Source Directory \\file1\ejgmgmt\ejgmgmt_working\
- Access is denied.
Any guesses as to what the issue is? I've read information indicating that, when UAC is enabled, I would have to run scripts as a software deployment instead. What are the steps for setting that up?
New to ADSelfService Plus?