Our favorite Virtual PC/Virtual Server scripting guru comes to our aid again, this time, with a script that will retrieve all active task objects from within a Virtual Server instance and then display the Task ID, description, and percentage complete.
Set vs = CreateObject("VirtualServer.Application")
Set tasks = vs.Tasks
If tasks.Count = 0 Then
Wscript.Echo "There are no tasks"
Else
Wscript.Echo "Active tasks: "
For Each task in tasks
Wscript.Echo " Task: " & task.ID & " : " & task.Description & " : " & task.PercentCompleted
Next
End If
Make sure to check out the original posting on Ben's site to read and add comments. Be sure to thank him to keep them coming.
Visit the original post, here.