Gets the task definition object of a scheduled task that is registered on the local computer
Functions: | |
Type: | |
Toolsets: |
Get-ScheduledTask -CimSession $s | % { [PSCustomObject]@{State=$_.State; TaskName=$_.TaskName; TaskPath=$_.TaskPath; Actions=$($a=$_.Actions;$($a.Id,$a.WorkingDirectory,$a.Execute,$a.Arguments).Where({$_ -ne $null}) -join " "); Author=$_.Author; Description=$_.Description; SecurityDescriptor=$_.SecurityDescriptor } }
Usecase
$s
using New-CimSession
ScheduledTasks