Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Scheduled Task Audit

Summary

This script audits scheduled tasks to identify which user accounts are running them.

Sample Run

Sample Run

Variables

VariableDescription
ProjectNameProject name where the script will store its work
JsonFileNameThe name of the JSON file where script data is stored
TableNameThe name of the table where the script data will be stored after converting from the JSON file
WorkingDirectoryThe directory where the project file and the JSON file are stored
SQLDeleteStatementThe SQL statement used to clear data from the table for the computer ID
SQLStartStatementThe SQL statement used to insert data, excluding duplicates

Dependencies

Process

This script creates a table named "plugin_proval_scheduled_tasks" to store the scheduled task details. It then creates a PowerShell script (ps1 file) at the path "C:/ProgramData/_automation/script/@ProjectName@/ScheduledTaskAudit.ps1". The script is executed using a shell command, and the data is stored in a JSON file. Finally, the JSON file is converted and pushed into the table.

Output

  • Script log
  • plugin_proval_scheduled_tasks
  • Data view
  • etc.