Skip to content

Instantly share code, notes, and snippets.

@tyranid
Created May 15, 2017 21:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tyranid/92e1c7074a9a7b0d5d021e9218e34fe7 to your computer and use it in GitHub Desktop.
Save tyranid/92e1c7074a9a7b0d5d021e9218e34fe7 to your computer and use it in GitHub Desktop.
$tasks = Get-ScheduledTask |
Where-Object { $_.Principal.RunLevel -ne "Limited" -and
$_.Principal.LogonType -ne "ServiceAccount" -and
$_.State -ne "Disabled" -and
$_.Actions[0].CimClass.CimClassName -eq "MSFT_TaskExecAction" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment