Avatar of Tessando
Tessando
Flag for United States of America asked on

Robocopy Script As Scheduled Task Without Admin Permissions

I'd like to use Robocopy to copy folders between two servers on the same domain. I've got a working script, but I have the requirements to use a Domain User that is not in the Local or Domain Administrator's group (this is a requirement from above). So, I've created the user DOMAIN/Scheduled_Tasks.

This is going from a Windows Server 2012r2 to Windows Server 2016 machine.

This script works when I run it manually (as I am logged in to the Server as an Administrator), but I get the error "Access is denied" when I attempt to run it with the created User DOMAIN/Scheduled_Tasks, which is the biggest clue that it's permissions driven:

ERROR 5 (0x00000005) Accessing Source Directory \\10.0.0.230\D$\Folder\Webs\www_site_com\
Access is denied.

Open in new window


I've given Security Folder Permissions to the DOMAIN/SCHEDULED_TASKS users (everything from Read/Execute to Full Control). I've also added the DOMAIN/SCHEDULED_TASKS user to the "Log On As Batch" local GPO.

I'm curious as to what I'm missing since adding the DOMAIN/SCHEDULED_TASKS user to the local Administrator group isn't an option. Also of note is that I set this up per McKnife's response from a couple weeks ago.

I appreciate any insight from fellow Windows Admins.

...
SecurityWindows 10AzureWindows Server 2016* Robocopy

Avatar of undefined
Last Comment
Tessando

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
McKnife

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Tessando

ASKER
Thanks McKnife. Would that be a share on the Source or Destination D: drive?
McKnife

On the source.
Tessando

ASKER
This worked. Thank you for your help!
Your help has saved me hundreds of hours of internet surfing.
fblack61