Quantcast
Channel: powershell Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 8

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

$
0
0
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 all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>