PowerShell Logo Small

New-ScheduledTaskAction



This is the built-in help made by Microsoft for the command 'New-ScheduledTaskAction', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a scheduled task action.

SYNTAX


New-ScheduledTaskAction [-Execute] <String> [[-Argument] <String>] [[-WorkingDirectory] <String>] [-AsJob [<SwitchParameter>]] [-CimSession
<CimSession[]>] [-Id <String>] [-ThrottleLimit <Int32>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-ScheduledTaskAction cmdlet creates an object that contains the definition of a scheduled task action. A scheduled task action
represents a command that a task executes when Task Scheduler runs the task. You can use a task action definition to register a new scheduled
task or update an existing task registration.


A task can have a single action or a maximum of 32 actions. When you specify multiple actions, Task Scheduler executes the actions
sequentially. The Task Scheduler service controls tasks activation, and it hosts the tasks that it starts.



<

RELATED LINKS

Register-ScheduledTask
New-ScheduledTask
New-ScheduledTaskPrincipal
Enable-ScheduledTask
Get-ScheduledTaskInfo
Start-ScheduledTask

REMARKS

<

Examples


Example 1: Create a scheduled task action

PS C:\> New-ScheduledTaskAction -Execute "PowerShell.exe"



This command creates a new scheduled task action that runs PowerShell.exe.