Skip to content

Run PowerShell as Scheduled Task — by Microsoft Q&A community (accepted answer, anonymous) with Rich Matheisen

intermediateforumLink only (©)

A script that worked by hand failed under Task Scheduler. The accepted answer says not to tick Do not store password when using Run whether user is logged on or not, since the task then cannot reach network resources, and to isolate the problem with a trivial test script and -noexit. Rich Matheisen recommends Start-Transcript for diagnosis and says two-factor authentication won't work in a scheduled task; the poster suspected a smart-card PIN prompt. No confirmed final fix is recorded.

Quick steps

  1. Leave Do not store password unticked for network access
  2. Add Start-Transcript / Stop-Transcript to the script

Paraphrased from the source. Menus can differ by version, so check the original for full details.

Read the full thread on learn.microsoft.com

Source: Run PowerShell as Scheduled Task by Microsoft Q&A community (accepted answer, anonymous) with Rich Matheisen. Licence: Link only (©).

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

task schedulerpowershelltroubleshootingscheduled tasks

More in Scheduling (Task Scheduler, launchd, cron)

Run bash (.sh) via launchd using a plist in /Library/LaunchAgents — by VikingOSX and etresoft on Apple Community

intermediateforum

VikingOSX shows a working LaunchAgent for a shell script: plist in ~/Library/LaunchAgents with 644 permissions, Label, RunAtLoad, StartInterval and full paths only. The original poster got theirs working after moving the script out of ~/Documents, and etresoft points to privacy permissions instead, noting shell scripts silently fail without Full Disk Access.