Export-HpcNodeXml

Export-HpcNodeXml

Exports information about the specified compute nodes to an XML file.

Syntax

Parameter Set: AllNode
Export-HpcNodeXml -Path <String> [-Force] [-Scheduler <String> ] [ <CommonParameters>]

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

Parameter Set: Node
Export-HpcNodeXml -Node <HpcNode[]> -Path <String> [-Force] [-Scheduler <String> ] [ <CommonParameters>]

Detailed Description

Exports information about the specified compute nodes to an XML file. You can specify the compute nodes by name or by using HpcNode objects that you retrieve with the Get-HpcNode cmdlet.

Parameters

-Force

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

Aliases

none

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String[]>

Specifies a list of the names of one or more compute nodes that you want to export. You cannot specify both the Name and Node parameters.

Aliases

none

Required?

true

Position?

1

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Node<HpcNode[]>

Specifies a list of one or more HpcNode objects for the compute nodes that you want to export. Use the Get-HpcNode cmdlet to get the HpcNode objects for the nodes. You cannot specify both the Node and Name parameters.

Aliases

none

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Path<String>

Specifies a name for the XML file to which you want to export the nodes, including the full or relative path to the file if the Export-HpcNodeXML 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 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

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 compute nodes. 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

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

  • One or more HpcNode objects.

Outputs

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

  • None.

Notes

  • You cannot export a head node. You can import the node XML file later to add compute nodes to a cluster by using the Import-HpcNodeXML cmdlet. For example, if you export the information about the nodes to a node XML file with the Export-HpcNodeXML cmdlet, then remove those nodes from the cluster with the Remove-HpcNode cmdlet to upgrade them or perform maintenance on them, you can add the nodes back to the cluster by importing the node xml file.

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

Examples

EXAMPLE 1

Exports information about the compute node named ComputeNode1 to the XML file located at C:\MyNodeXMLFiles\ComputeNode1.xml.

PS C:\>Export-HpcNodeXML -Name ComputeNode1 -Path C:\MyNodeXMLFiles\ComputeNode1.xml

EXAMPLE 2

Gets the HpcNode objects for the nodes in the NodeGroupA node group, then exports information about those nodes to the XML file located at C:\MyNodeXMLFiles\NodeGroupA.xml. If this XML file already exists, the Export-HpcNodeXML cmdlet overwrites it without prompting.

PS C:\>Get-HpcNode -Group NodeGroupA | Export-HpcNodeXML -Path C:\MyNodeXMLFiles\NodeGroupA.xml -Force

Get-HpcNode

Import-HpcNodeXml

Remove-HpcNode