[ Home ] [ Tech Tips ] [ Raspberry Pi ] [ Powershell ] [ Ubuntu ] [ Django ] [ About ]
PowerShell | Scheduled Task Template

PowerShell | Scheduled Task Template 

Simple one today.

Just a quick template on scheduled tasks. Just copy and paste to your script. Super fun happy times

$NewScheduledTaskAction = New-ScheduledTaskAction -Execute “PowerShell.exe” -Argument “-ExecutionPolicy Bypass C:\scripts\test.ps1”
$NewScheduledTaskTrigger = New-ScheduledTaskTrigger -Daily -At ‘3AM’
$NewScheduledTask = New-ScheduledTask -Action $NewScheduledTaskAction -Trigger $NewScheduledTaskTrigger
$NewScheduledTask | Register-ScheduledTask -TaskName “Script” -User “Luke” -Password “SuperSecurePassword”


Luke Keam
Thank you for reading. Any questions, comments or suggestions email me [email protected]
Luke Keam
techgeek.biz

FOLLOW US

Name
Email:

AD

quick-time-management logo.biz

Quick-Time-Management.com

We strive to make you healthy and productive for the long haul. Easily look back and see how you effective you have been.