LogoLogo
TwitterLinkedInGitHubPowerShell Gallery
  • About
  • Events
  • Blog
    • 2022
      • 🆕OSD January Update
      • 🆕PSCloudScript Basics
    • 2021
      • Start-OOBEDeploy
      • OSDCloud
      • PowerShell Gallery in WinPE
      • BitLocker KeyProtectors
      • WindowsCapability -and WindowsPackage
      • Scheduled Tasks
        • Building a Task
        • Task Permissions
        • Task Trigger
        • Action a PowerShell File
        • Action a PS Encoded Script
        • Conclusion
          • Windows Activation and Edition Change
          • REG.exe and Multiple Actions
    • 2019
      • 2019-02
        • Offline Servicing vs Reference Image
      • 2019-04
        • Windows 10 Upgrade MultiLang (Uno)
      • 2019-06
        • Offline Servicing Windows 10 with CU for .NET 4.8
        • OSDBuilder and .NET CU KB4480056
      • 2019-09
        • Black Screen During Windows 10 Setup
      • 2019-11
        • I Hate OSDBuilder
    • 2018
      • WinPE 10 1809 WPF DLL Fix
      • Microsoft Update Releases
      • Create WinPE.wim from Boot.wim or WinRE.wim
      • Windows Setup: FAT32 USB with +4GB Install.wim
      • Windows 10 from ESD
      • Windows 10 1809 Appx Issues
      • Mount-WindowsImage -Optimize
  • Guides
    • Autopilot App Registration
    • PSCloudScript
      • PS Cmdlets
      • GitHub Gist
      • GitHub Git Repo
      • Content-Type | Azure Static Web App
      • Command Shortening
      • Azure Key Vault Secret
      • OSD PowerShell Module
      • PSCloudScript Examples
        • Autopilot
        • AutopilotOOBE
        • OSDCloud Live
        • WinPE PowerShell Gallery
        • OSDCloud WinPE and OOBE
    • go OSDCloud
      • Azure Function
      • Custom Domain
      • SSL Binding
      • Proxies
  • PowerShell
    • OSD
    • OSDCloud
    • OSDBuilder (Offline Servicing)
    • OSDSUS (Update Catalogs)
    • OSDUpdate (MS Updates)
    • OSDDrivers (Compact Drivers)
    • PShot
      • Release Notes
      • Usage
        • -Directory
        • $AutoPath
        • -Prefix
        • -Count
        • -Delay
        • -Clipboard
        • -Primary
        • The Object
      • Technical
        • Why a Module?
        • Resolution, Scale and DPI
Powered by GitBook
On this page
  • A Simple Task
  • Adam The Automator
  1. Blog
  2. 2021

Scheduled Tasks

PowerShell ScheduledTasks Module

PreviousWindowsCapability -and WindowsPackageNextBuilding a Task

Last updated 4 years ago

Its been a while since I have done a writeup, and after spending a few days working with PowerShell and Scheduled Tasks, its time to get some work done. The goal of this writeup is to detail how to make a Scheduled Task using PowerShell and to run these Tasks as a Standard User with the SYSTEM account. A good start is to link to Microsoft's official word on the ScheduledTasks Module

A Simple Task

Microsoft has some basic examples on how to create a Scheduled Task, so here is the example they give. I strongly recommend understanding how this is done before going forward to the next article

PS C:\> $A = New-ScheduledTaskAction -Execute "Taskmgr.exe"
PS C:\> $T = New-ScheduledTaskTrigger -AtLogon
PS C:\> $P = New-ScheduledTaskPrincipal "Contoso\Administrator"
PS C:\> $S = New-ScheduledTaskSettingsSet
PS C:\> $D = New-ScheduledTask -Action $A -Principal $P -Trigger $T -Settings $S
PS C:\> Register-ScheduledTask T1 -InputObject $D

Adam The Automator

Probably the best written PowerShell and Scheduled Tasks article is from and posted at the following link. Give it a read, and give June a Twitter follow!

June Castillote
ScheduledTasks Moduledocsmsft
Logo
New-ScheduledTask (ScheduledTasks)docsmsft
Logo
How to Set Up and Manage Scheduled Tasks with PowerShellAdam the Automator
Logo