API Reference
Command
Get-CxScheduledTask
Gets Windows Scheduled Tasks (Exec actions) from the local or a remote computer.
Examples
Example 1
Get-CxScheduledTask
Example 2
Get-CxScheduledTask -ComputerName SRV1 -Suspicious -OnlySuspicious
Example 3
# Show who tasks run as
Get-CxScheduledTask | Select-Object Path,RunAsUser,RunAsLogonType,RunAsIsSystem,RunAsIsGmsa
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Get-CxScheduledTask [-ComputerName <string>] [-Credential <PSCredential>] [-Folder <string>] [-IncludeLolBins] [-OnlySuspicious] [-Suspicious] [<CommonParameters>]#Parameters
- ComputerName string
- Target computer. Omit or use '.' for local.
- Credential PSCredential
- Credential for remote connections.
- Folder string
- Optional folder to scope enumeration (e.g., \Microsoft\Windows).
- IncludeLolBins SwitchParameter
- Include LOLBIN heuristics when using -Suspicious (mshta/wscript/pwsh/…).
- OnlySuspicious SwitchParameter
- When set with -Suspicious, returns only suspicious tasks.
- Suspicious SwitchParameter
- When set, computes suspicion fields on returned objects.
Outputs
ComputerX.ScheduledTasks.ScheduledTaskInfo