PowerShell Genie

Scheduled task returns 0x8007052E

Incident 2 min read Troubleshooting walkthrough

Documentation: Microsoft Learn

Work the problem

The task cannot log on

Fictional case: LastTaskResult is 2147943726 (0x8007052E). The service account password changed yesterday.

What should you investigate first?

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

1PS> Get-ScheduledTask -TaskName 'TaskName' | Select-Object -ExpandProperty Principal; Get-ScheduledTaskInfo -TaskName 'TaskName'

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

  1. Confirm the exact Run As identity configured on the task.
  2. 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.
  3. Re-enter the task credentials through the supported task configuration workflow, or move the task to a gMSA when the workload supports one.
  4. 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

Get-ScheduledTaskInfo reference

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

Genie guideScheduled task returns 0x8007052E

Start with the symptom, then inspect the checks and evidence. These are investigation steps; more than one cause may fit.