Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Get the list of windows schedule task

$
0
0

Hello friends, 

i got the below from powershell.com that to get the list of schedule task, but is there any way where i can get the list of the task for couple of machines or for the machines from OU container like that along with who created that task etc etc ..

$service=New-Object-ComObjectSchedule.Service$service.Connect($env:COMPUTERNAME)$folder=$service.GetFolder('\Microsoft\Windows\DiskDiagnostic')$tasks=$folder.GetTasks(1) # Number of tasks in that container:$count=$tasks.Count"There are $count tasks"# Task statistics:$tasks|Select-Object-PropertyName, Enabled, LastRunTime, LastTaskResult, NextRunTime


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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