Search notes:

PowerShell cmdLet Get-ScheduledTask

get-scheduledTask returns an array of Microsoft.Management.Infrastructure.CimInstance objects.
$i = 0
foreach ($task in (get-scheduledTask)) {


# if ($task.actions.length -gt 0)  # Seems always to be 1
  if ($task.actions.execute)
   {

  # "i: $($i)"
    "taskPath   : $($task.taskPath)"
    "taskName   : $($task.taskName)"
    "state      : $($task.state)"
    "triggers   : $($task.triggers)"
    "date       : $($task.date)"
    "description: $($task.description)"

    foreach ($action in $task.actions) {
      "    $($action.execute)"
      "    $($action.arguments)"
      #      $action.id
      #      $action.workingDirectory
      #      $action.psComputerName

    }
   '------------------------------------------'
   }
   $i++

}
Github repository about-PowerShell, path: /cmdlets/scheduledTask/get/tasks-and-actions.ps1

-TaskPath

Get-ScheduledTask -TaskPath \Microsoft\Windows\*update*

Required trailing slash

It seems that a trailing slash is required in the following case.
The following command produces PS D:\exports> Get-ScheduledTask -TaskPath '\x\syn' Get-ScheduledTask : No MSFT_ScheduledTask objects found with property 'TaskPath' equal to '\x\syn'. Verify the value of the property and retry.
get-scheduledTask -taskPath '\x\syn'
However, this works:
get-scheduledTask -taskPath '\x\syn\'

Forward slashes don't work

Apparently, when specifying a task path, backward slashed are required. Forward slashed cause an error:
PS C:\> get-scheduledTask -taskPath /tq84/ -taskname *
Get-ScheduledTask : No matching MSFT_ScheduledTask objects found by CIM query for instances of the Root/Microsoft/Windows/TaskScheduler/MSFT_ScheduledTask class on the  CIM server:
SELECT * FROM MSFT_ScheduledTask WHERE ((TaskName LIKE '%')) AND ((TaskPath LIKE '/tq84/')).

See also

Powershell command noun: scheduledTask

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1788564295, '216.73.216.30', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/command-inventory/noun/scheduledTask/get(94): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78