Scheduled task runs interactively but fails under SYSTEM after domain migration with 'access denied' to network resource
Environment
Windows Server 2019 hosts joined to new Active Directory domain after migration; scheduled task configured to run a PowerShell script at 02:00 under the SYSTEM account; task executes successfully when run manually by an admin but fails when triggered by scheduler.
Symptoms
Automated nightly task that downloads files from a file server and writes to C:\Data\Imports consistently aborts with exit code 5 when run by Task Scheduler. Manual Run As (right‑click -> Run) as Local System succeeds. Admin user runs the task interactively and it succeeds.
Observations
Task history shows 'Action Failed 0x80070005' at scheduled time. PowerShell error logged to application event log indicates 'Access to \fileserver.newdomain.localackupsile.zip denied'. SMB access from the server to the file server using 'net use' as SYSTEM fails, but accessing same share under an admin user works. Kerberos preauthentication errors in Domain Controller security logs during task runtime time window. Machine account in AD shows SID history entries from old domain in attributes; trust relationship between domains is configured but constrained.
Already attempted
Verified scheduled task 'Run whether user is logged on or not' and 'Do not store password' settings. Tested alternate credentials by configuring task to run under a domain service account — then task succeeds. Reset computer account password in AD and rebooted host — no change. Tested network share access using psexec -s to a cmd prompt, attempted 'dir \fileserver...' as SYSTEM and reproduced 'Access denied'.
Question
Why does the same scheduled task succeed when invoked manually or using a domain service account but fail under SYSTEM at schedule time after the AD migration, and what safe steps will restore scheduled SYSTEM-run network access without reconfiguring the job to use stored credentials?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Windows23% match
Scheduled tasks fail to start after migrating machines to a new domain controller
Open0 answers - Windows21% match
Roaming Windows laptops fail Group Policy update: DNS suffix missing on corporate VLAN causing 'could not locate domain controller'
Open0 answers - Windows20% match
Mapped SMB drives show 'network path not found' after Windows resume while domain credentials still valid
Open0 answers