Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Export-HpcTask

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

Syntax

Export-HpcTask [-Scheduler <string>] -JobId <int> -Path <string> -TaskId <int> [<CommonParameters>]

Export-HpcTask [-Scheduler <string>] -Path <string> -Task <HpcTask> [<CommonParameters>]

Detailed Description

Exports the settings for the specified task to a 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

-JobId <int>

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.

 

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.

 

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>

 

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.

 

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-TaskId <int>

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.

 

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.

Input and Return Types

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

 

Input Type

An HpcTask object.

Return Type

None.

Example 1

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

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.

Example 2

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

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.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.