Scheduled task returns 0x8007052E
Documentation: Microsoft Learn
Work the problem
The task cannot log on
Fictional case: LastTaskResult is 2147943726 (0x8007052E). The service account password changed yesterday.
Reasoning notebook
Record the evidence that supports your answer and the check you would run next. Your notes stay in this browser — nothing is uploaded.
Why it happens
Windows rejected the supplied logon credentials. The password may have changed, the account may be disabled, or the task may still hold credentials for an old account context.
Check this first
What to look for
The code maps to a logon failure. Check the configured identity and update credentials through the supported task workflow.
Working through it
- Confirm the exact Run As identity configured on the task.
- Verify that the account is enabled and can log on using the intended logon type; do not test by placing its password in a script.
- Re-enter the task credentials through the supported task configuration workflow, or move the task to a gMSA when the workload supports one.
- Run the task manually and capture its new LastTaskResult.
Avoiding it next time
Verify the repair: Run the task again and inspect a new LastRunTime, its result code and the script’s own completion evidence.
Primary documentation
What 0x8007052E means
The low-order Win32 code is 1326 (0x52E), ERROR_LOGON_FAILURE: the supplied user name or password was rejected. This is a task logon failure, so changing PowerShell execution policy does not repair the stored credentials.
Confirm the next run
After correcting the task identity or stored credentials, check a new LastRunTime and LastTaskResult. An old failed result can remain visible until another run finishes. Also verify the script's own output or log; a scheduler result alone does not prove that the business task completed.
Microsoft's logon error codes · Get-ScheduledTaskInfo reference