Forum Discussion

jhenke6229's avatar
jhenke6229
Copper Contributor
Sep 08, 2021
Solved

How to return Windows Scheduled task Description?

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?

 

 

 

  • 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.

2 Replies

  • psophos's avatar
    psophos
    Brass 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.

Resources