Share via


Export-HpcNodeTemplate

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

Syntax

Name (Default)

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

Template

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

Description

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

Examples

Example 1: Export a node template to a specified file

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

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

Example 2: Get a node template and export it

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

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.

Parameters

-ClusterConnectionString

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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Name
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Scheduler

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\>

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Template

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.

Parameter properties

Type:HpcNodeTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Template
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Inputs

HpcNodeTemplate

Outputs

None

Notes

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