Hi
I have the following line within a ForEach loop -- $Tasks = schtasks.exe /query /s $Computer /V /FO CSV | ConvertFrom-Csv | Where { ($_.Author -ne "Microsoft Corporation") -and ($_."Run As User" -Like "*administrator")} -- which returns scheduled tasks on a server which are running as administrator. What I would like to do is take $Tasks and extract only HostName, TaskName and, Run As User information and pass this to a file. Any help greatly appreciated.
A big thanks to Martin9700 for the foundations of this script.
Pete.