Export (0) Print
Expand All
Expand Minimize

Export-HpcTask

Updated: January 10, 2014

Export-HpcTask

Exports the settings for the specified task to a task XML file.

Syntax

Parameter Set: task
Export-HpcTask -Path <String> -Task <HpcTask> [-Force] [-Scheduler <String> ] [ <CommonParameters>]

Parameter Set: id
Export-HpcTask -JobId <Int32> -Path <String> -TaskId <Int32> [-Force] [-Scheduler <String> ] [ <CommonParameters>]




Detailed Description

Exports the settings for the specified task to a task XML file. You can specify the task for which you want to export the settings by using the job identifier and task identifier for the task or by using an HpcTask object. After you export the task XML file, you can then specify the task XML file in the TaskFile parameter of the Add-HpcTask cmdlet to add a new task to a job with the same settings as the exported task.

Parameters

-Force

Replaces the task XML file if it already exists, without prompting the user.


Aliases

none

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobId<Int32>

Specifies the job identifier of the job that contains the task that you want to export. If you specify the JobID parameter, you must also specify the TaskId parameter. You can use the JobId and TaskId parameters together to specify the job you want to export, or you can use the Task parameter instead, but you cannot combine the Task parameter with the JobId or TaskId parameter.


Aliases

none

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies a name for the XML file to which you want to export the task, including the full or relative path to the file if the Export-HpcTask cmdlet should not save the file in the current directory.

This cmdlet creates any directories that do not already exist in that path. If the file already exists, the cmdlet prompts you to confirm whether you want to overwrite the file.


Aliases

none

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Scheduler<String>

Specifies the host name or IP address of the head node for the cluster that includes the task. The value must be a valid computer name or IP address. If you do not specify the Scheduler parameter, this cmdlet uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies. To set this environment variable, run the following cmdlet:

Set-Content Env:CCP_SCHEDULER <head_node_name>


Aliases

none

Required?

false

Position?

named

Default Value

%CCP_SCHEDULER%

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Task<HpcTask>

Specifies an HpcTask object that represents the task that you want to export. Use the Get-HpcTask cmdlet to get an HpcTask object for a task. You can use the Task parameter to specify the job you want to export, or you can use a combination of the JobId and TaskId parameters instead, but you cannot combine the Task parameter with the JobId or TaskId parameter.


Aliases

none

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-TaskId<Int32>

Specifies the task identifier of the tasks that you want to export. If you specify the TaskId parameter, you must also specify the JobId parameter. You can use the JobId and TaskId parameters together to specify the job you want to export, or you can use the Task parameter instead, but you cannot combine the Task parameter with the JobId or TaskId parameter.


Aliases

none

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • An HpcTask object.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

Examples

EXAMPLE 1

Exports the settings for the first task in the job with a job identifier of 1 to a file at C:\MyTasks\Task_1_1.xml.


PS C:\>Export-HpcTask -JobId 1 -TaskId 1 -Path C:\MyTasks\Task_1_1.xml

EXAMPLE 2

Gets an HpcTask object for the fourth task in the job with a job identifier of 2, then exports the settings for that task to a file at C:\MyTasks\Task_2_4.xml.


C:\PS>Get-HpcTask -JobId 2 -TaskId 4 | Export-HpcTask -Path C:\MyTasks\Task_2_4.xml

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft