Export-HpcNodeTemplate

Export-HpcNodeTemplate

Creates an XML-based representation of a node template and stores it in a file.

Syntax

Parameter Set: Name
Export-HpcNodeTemplate [-Name] <String> -Path <String> [-ClusterConnectionString <String[]> ] [-Force] [-Scheduler <String[]> ] [ <CommonParameters>]

Parameter Set: Template
Export-HpcNodeTemplate -Path <String> -Template <HpcNodeTemplate> [-ClusterConnectionString <String[]> ] [-Force] [-Scheduler <String[]> ] [ <CommonParameters>]




Detailed Description

The Export-HpcNodeTemplate cmdlet creates an XML-based representation of a node template and stores it in a file.

Parameters

-ClusterConnectionString<String[]>

Specifies an array of cluster connection strings for the cluster to which you want to add the device drivers. The value format is host1,host2,host3. If you do not specify the ClusterConnectionString parameter, this cmdlet uses the connection string on the head node that the CCP_CONNECTIONSTRING environment variable specifies. To set this environment variable, run the following cmdlet: Set-Content Env: CCP_CONNECTIONSTRING <head_node_name>.

This parameter was introduced in HPC Pack 2016.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Indicates that this operation replaces the node template file if it already exists, without prompting the user.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the node template that you want to export. You cannot specify both the Name and Template parameters.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

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

The maximum length for the path is 260 characters. The maximum length for the directory portion of the path is 248 characters.

This cmdlet creates any directories that do not already exist in that path. If the file already exists and you do not specify the Force parameter, the cmdlet prompts you to confirm whether or not you want to replace the file.


Aliases

none

Required?

true

Position?

named

Default Value

none

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 node templates. 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

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Template<HpcNodeTemplate>

Specifies an HpcNodeTemplate object for the node template that you want to export. Use the Get-HpcNodeTemplate cmdlet to get the HpcNodeTemplate object for a node template. You cannot specify both the Template and Name parameters.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

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

  • HpcNodeTemplate

Outputs

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

  • None

Notes

  • You must be a cluster administrator to run this cmdlet successfully.

Examples

Example 1: Export a node template to a specified file

This command exports the default node template for compute nodes to the XML file located at C:\MyNodeTemplates\DefaultNodeTemplate.xml.


PS C:\> Export-HpcNodeTemplate -Name "Default ComputeNode Template" -Path "C:\MyNodeTemplates\DefaultNodeTemplate.xml"

Example 2: Get a node template and export it

This command gets the HpcNodeTemplate object for the node template named MyNodeTemplate, and then exports that node template to the XML file located at C:\MyNodeTemplates\MyNodeTemplate.xml. If the file already exists, this example overwrites the file.


PS C:\> Get-HpcNodeTemplate -Name MyNodeTemplate | Export-HpcNodeTemplate -Path "C:\MyNodeTemplates\MyNodeTemplate.xml" -Force

Related topics

Community Additions

ADD
Show: