Quantcast
Viewing latest article 3
Browse Latest Browse All 8

Commented Issue: Get-ScheduledTasks has a lot of unneccessary script [2]

You could replace it all with:

function Get-ScheduledTask {
end {
SCHTASKS.EXE /QUERY /FO CSV | ConvertFrom-Csv
}
}
Comments: You are right, but the function has been written in this way for two reasons : 1- To be usable in any OS language (the split is used to retrieve status and taskname columns) 2- To interact with Stop and Start Functions (with the NoteProperty generated)

Viewing latest article 3
Browse Latest Browse All 8

Trending Articles