Get-HpcOperation

Gets an operation.

Syntax

Get-HpcOperation
   [-Node <HpcNode[]>]
   [-NodeName <String[]>]
   [-State <ChangeState[]>]
   [-StartTime <DateTime>]
   [-EndTime <DateTime>]
   [-Name <String[]>]
   [-Definition <String[]>]
   [-ClusterConnectionString <String[]>]
   [-Scheduler <String[]>]
   [<CommonParameters>]
Get-HpcOperation
   [[-Id] <String[]>]
   [-ClusterConnectionString <String[]>]
   [-Scheduler <String[]>]
   [<CommonParameters>]
Get-HpcOperation
   [-WorkItem <HpcWorkItem>]
   [-ClusterConnectionString <String[]>]
   [-Scheduler <String[]>]
   [<CommonParameters>]

Description

The Get-HpcOperation cmdlet gets one or more specified operations, or gets the operations that meet the specified criteria. If you do not redirect the HpcOperation objects that are the output of the Get-HpcOperation cmdlet to another cmdlet or save the objects to variables, the Get-HpcOperation cmdlet displays information about the operation such as the name, status, and last update time for the operation.

Examples

Example 1: Get all operations

PS C:\>Get-HpcOperation

This command gets all of the operations for the HPC cluster.

Example 2: Get operations by node name

PS C:\>Get-HpcOperation -NodeName "ComputeNode01,ComputeNode02" -StartDate (Get-Date).AddDays(-1) -EndDate (Get-Date)

This command gets all of the operations that were performed on the nodes named ComputeNode01 and ComputeNode02 in the last day.

Example 3: Get operations by state

PS C:\>Get-HpcOperation -Definition "Reimage Nodes" -State Failed,Reverted

This command gets all of the operations with the operation type named Reimage Nodes that have a state of Failed or Reverted.

Example 4: Get operations by name

PS C:\>Get-HpcOperation -Name "Deleting metric MyMetric."

This command gets all of the operations named Deleting metric MyMetric.

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.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Definition

Specifies an array of operation types or definitions for the operations that you want to get.

Valid operation types are:

  • Add Node To Group
  • Add or Update Counter
  • Archive Management Data
  • Archive Scheduler Data
  • Assign Template
  • Bring Nodes Online
  • Check Head Node Configuration
  • Collect Usage Data
  • Configuration Update
  • Delete Operations
  • Delete Template
  • Discovery
  • Edit Nodes
  • Export Metrics
  • Export Template
  • Import Metrics
  • Import Template
  • Initialize Cluster
  • Load Node Configuration
  • Maintain Nodes
  • Modify Groups
  • Reboot Nodes
  • Reimage Nodes
  • Reject Nodes
  • Remove Counters
  • Remove Node From Group
  • Remove Nodes
  • Run Diagnostics
  • Save Node Configuration
  • Security Update
  • Shutdown Nodes
  • Start Nodes
  • Take Nodes Offline
  • Update Global Configuration
  • Update Network
  • Update Template
Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EndTime

Specifies a DateTime object or equivalent string that indicates the ending date and time of the period for which you want to get operations. The period covers dates and times that are earlier than the value that the EndTime parameter specifies and later than the value that the StartTime parameter specifies.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Specifies an array of globally unique identifiers (GUIDs) for the operations that you want to get. If you specify the Id parameter, the only other parameters you can specify are the Scheduler parameter and the common parameters.

Type:String[]
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies an array of names for the operations that you want to get.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Node

Specifies an array of HpcNode objects for the nodes on which the operations that you want to get were performed. Use the Get-HpcNode cmdlet to get HpcNode objects for the nodes. You cannot specify both the Node and NodeName parameters.

Type:HpcNode[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-NodeName

Specifies an array of the names of nodes on which the operations that you want to get were performed. You cannot specify both the NodeName and Node parameters. This parameter is a filter parameter, so you do not receive an error for specifying a node the does not exist in the HPC cluster as long as you specify at least one node that does exist.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scheduler

Specifies the host name or IP address of the head node for the cluster on which the operations ran. 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\>

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StartTime

Specifies a DateTime object or equivalent string that indicates the starting date and time of the period for which you want to get operations. The period covers dates and times that are later than the value that the StartTime parameter specifies and earlier than the value that the EndTime parameter specifies.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-State

Specifies an array of states that currently apply to the operations that you want to get. Valid values are:

  • Archived
  • Committed
  • Executing
  • Failed
  • Reverted
  • Editable
  • Reverting
  • FailedToExecute
  • FailedToRevert
  • Deleted
Type:ChangeState[]
Accepted values:Editable, Executing, Committed, Reverting, Reverted, FailedToExecute, FailedToRevert, Deleted, Archived
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkItem

Specifies the HpcWorkItem object that contains the operations that you want to get. An HpcWorkItem object is a collection of operations. The Assign-HpcNodeTemplate cmdlet returns an HpcWorkItem object when you specify the Async parameter for that cmdlet.

Type:HpcWorkItem
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

HpcNode[]

Outputs

HpcOperation[]

Notes

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