guyrleech

Get Scheduled Task completion statuses

Jul 29th, 2021
1,143
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
RAW Paste Data