Created
May 19, 2017 18:25
-
-
Save felmoltor/0ae72bec2e3457609bb2a78949496871 to your computer and use it in GitHub Desktop.
Scan vulnerable scheduled task
This file contains hidden or 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 | | |
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