What does this task target?

This will return which [typed] class the specified task will run against.

foreach ($targetId in get-task | where {$_.displayname -match "task name"} | foreach-object {$_.get_target().id.tostring()}) {get-monitoringclass | where {$_.id -eq $targetId} | select displayname}

main menu