PowerShell Scanner for Scheduled Tasks and running Services

I have a need to see all the enabled scheduled tasks and what account they are running as... and all active services with the runas account.

I've been searching the archives, found a chain asking about that ability 8 years ago but I dont yet see anything.

Has anyone found a PS script that can do this?



1 comment
Date Votes
  • For scheduled tasks, I modified this: https://community.spiceworks.com/topic/256331-get-user-info-that-scheduled-task-runs-as

    schtasks.exe /Query /V /FO CSV | ConvertFrom-Csv | Select-Object 'TaskName', 'Next Run Time', 'Status', 'Last Run Time', 'Task To Run', 'Scheduled Task State', 'Run As User', 'Schedule Type'

    To see the available properties, run this:

    schtasks.exe /Query /V /FO CSV | ConvertFrom-Csv | Select-Object -First 1

    Inventory already has an Account field for Services.


Please sign in to leave a comment.

Didn't find what you were looking for?

New post