Skip to content

Instantly share code, notes, and snippets.

@felmoltor
Created May 19, 2017 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felmoltor/0ae72bec2e3457609bb2a78949496871 to your computer and use it in GitHub Desktop.
Save felmoltor/0ae72bec2e3457609bb2a78949496871 to your computer and use it in GitHub Desktop.
Scan vulnerable scheduled task
$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