Advertisement
guyrleech

Get Scheduled Task completion statuses

Jul 29th, 2021
1,993
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Replace Export-CSV with Out-GridView to see in real time
  2. Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-TaskScheduler/Operational'; Id = 201 } | Select TimeCreated,@{n='Task';e={$_.Properties[0].Value}},@{n='ExitCode';e={$_.Properties[3].Value}} | export-csv "Scheduled task statuses.csv" -NoTypeInformation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement