Created
July 26, 2015 06:22
-
-
Save alfeg/5119797cd2ebe4dbbbe6 to your computer and use it in GitHub Desktop.
Small powershell script to disable wake PC up for all scheduled tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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