PowerShell Logo Small

Export-ScheduledTask



This is the built-in help made by Microsoft for the command 'Export-ScheduledTask', 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

Exports a scheduled task as an XML string.

SYNTAX


Export-ScheduledTask [[-TaskName] <String>] [[-TaskPath] <String>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-ThrottleLimit
<Int32>] [<CommonParameters>]
Export-ScheduledTask [-InputObject] <CimInstance> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Export-ScheduledTask cmdlet exports the definition of a scheduled task into an XML string.



<

RELATED LINKS

Disable-ScheduledTask
Enable-ScheduledTask
Get-ScheduledTask
New-ScheduledTask
Register-ScheduledTask
Set-ScheduledTask
Start-ScheduledTask
Stop-ScheduledTask
Unregister-ScheduledTask
Get-ScheduledTaskInfo

REMARKS

<

Examples


Example 1: Export a scheduled task into an XML string.

PS C:\> Export-ScheduledTask –TaskName "UpdateDrivers" –TaskPath "\UpdateTasks\"



This command exports the UpdateDrivers scheduled task in the \UpdateTasks\ folder into an XML string. The command lists the XML string as its
output.




Example 2: Export all scheduled task definitions that are in the UpdateTasks folder.

PS C:\> Get-ScheduledTask -TaskPath "\UpdateTasks\" | Export-ScheduledTask



This command uses the Get-Scheduledtask cmdlet to get all scheduled tasks in the \UpdateTasks\ folder. The command pipes this information to
the Export-ScheduledTasks cmdlet, which exports the definitions of these scheduled tasks. The command lists the XML string of each task as its
output.