How to return Windows Scheduled task Description?

New Contributor

From the Windows Scheduled Task:


I see the Date, Author, Description, and URI tags under RegistrationInfo tag in the task XML file


I want to get the Description value.


I tried this:

$TaskInfo = [xml] (Get-Content $AbsolutePath)  # to the XML file

$TaskInfo.Task.RegistrationInfo just shows me Date, Author, and URI 


How can I return the Task.RegistrationInfo.Description?




2 Replies
best response confirmed by jhenke6229 (New Contributor)

@jhenke6229  You can try using these cmdlets:

Get-ScheduledTask -TaskName tasky  # Description
Get-ScheduledTaskInfo -TaskName tasky

If memory serves you;ll need to use both as the info isn't contained in 1 place.

@psophos Thanks.  Yep, can't believe I missed that