Skip to content

Instantly share code, notes, and snippets.

@alfeg
Created July 26, 2015 06:22
Show Gist options
  • Save alfeg/5119797cd2ebe4dbbbe6 to your computer and use it in GitHub Desktop.
Save alfeg/5119797cd2ebe4dbbbe6 to your computer and use it in GitHub Desktop.
Small powershell script to disable wake PC up for all scheduled tasks
$tasks = Get-ScheduledTask
ForEach ($task in $tasks)
{
if($task.settings.waketorun -eq 'True')
{
"$($task)"
$task.settings.WakeToRun = $false
Set-ScheduledTask -TaskName $task.TaskName -TaskPath $task.TaskPath -Settings $task.Settings
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment