none
PowerShell Script to fetch Task Scheduler details - Last Run Time and Last Run Result RRS feed

  • Question

  • Hello,

    I got a requirement to fetch the task scheduler details on multiple servers, 

    Where I am looking ONLY for "Last Run Time" and "Last Run Result"

    Tried some other scripts, but I am not getting these details.

    Your help will be much appriciated.

    Thanks.

    Regards,
    Manjunath Sullad


    Tuesday, July 14, 2015 10:43 AM

Answers

All replies

  • What does your script look like so far?

    If you are looking for pre-written scripts, you can check the Repository (link right at the top of this forum).

    This forum is for scripting questions, not script requests.


    -- Bill Stewart [Bill_Stewart]

    Tuesday, July 14, 2015 2:35 PM
    Moderator
  • how about this script?

    http://techibee.com/powershell/powershell-get-scheduled-tasks-list-from-windows-72008-computers/1647

    I don't like to post links but seems it exactly what your are looking for.

    Tuesday, July 14, 2015 2:47 PM
  • Thanks for suggestion,

    This is not Script request, Need suggestion while creating the script.

    I am trying to get the information LastRun / Last Run status of Task scheduler details from PS commands,

    If I run Get-ScheduledTask Taskname | GM  there is no option of Last Last Run date and Status, Where as we will get it for next run details,

    Is there any other method to get the Last Run time and Last run time status details from script.

    Thanks.


    <i><b>Regards, <br/> <a href="http://manjusullad.wordpress.com">Manjunath Sullad </a></i></b>

    Tuesday, July 14, 2015 2:57 PM
  • Thank you Darren.

    <i><b>Regards, <br/> <a href="http://manjusullad.wordpress.com">Manjunath Sullad </a></i></b>

    Friday, July 17, 2015 7:01 AM
  • Hi, f.e.

    (Get-ScheduledTask | Where { $PSITEM.TaskName -eq "Idle Maintenance"} | get-ScheduledTaskInfo).LastRunTime

    • Proposed as answer by Mathias Rühn Wednesday, March 7, 2018 10:45 AM
    Wednesday, March 7, 2018 10:45 AM
  •  Get-ScheduledTask 'Idle Maintenance'

    \_(ツ)_/

    Wednesday, March 7, 2018 2:54 PM