22 May 2014

Use the output of query and run scheduled tasks from a remote computer in powershell



the output will be formated in a csv format and can be assigned to a variable and interpreded:

$taskQuery = schtasks /Query /S computer_name /TN task_name /V /FO CSV

$taskQuery[1].split(',')[3]  - will output:

"Ready"

No comments:

Post a Comment