Windows PowerShell Cmdlet Equivalents for HPC Command-Line Commands
Updated: September 2010
Applies To: Windows HPC Server 2008, Windows HPC Server 2008 R2
Windows® HPC Server 2008 and Windows HPC Server 2008 R2 provide command-line commands and HPC cmdlets for Windows PowerShell as alternative ways to perform many of the same tasks that you can perform in HPC Cluster Manager. HPC cmdlets are HPC-specific cmdlets for Windows HPC PowerShell that become available when you add the Microsoft.HPC snap-in or open an HPC PowerShell window. You can use the command-line commands or HPC cmdlets in scripts to automate a series of tasks that you perform regularly.
You can use HPC cmdlets to perform most of the same tasks in Windows HPC Server 2008 and Windows HPC Server 2008 R2 that you can perform with command-line commands, in addition to many additional tasks that you cannot perform with command-line commands. Windows PowerShell also provides a powerful and flexible scripting environment, so you may want to consider converting existing command files and batch files that use command-line commands to PowerShell scripts to take advantage of these features.
The following table provides a list of the HPC cmdlets that are similar to the command-line commands in Windows HPC Server 2008 and Windows HPC Server 2008 R2. You can use them to convert command files and batch files that use command-line commands to PowerShell scripts. For command-line commands that have no equivalent HPC cmdlet, you can run the command-line commands within an HPC PowerShell window or in a script just as you would run them at a command prompt.
Note |
---|
The HPC cmdlet that the table lists is not always entirely identical to the corresponding command-line command. In some cases, the parameters that are available for the command-line command are not available or they differ from those for the HPC cmdlet, or the output for the HPC cmdlet differs slightly from that of the command-line command. In most cases, though, these differences are minor and you can use the PowerShell cmdlet for the same purposes as the command-line command. For more information about the parameters and the behavior of a specific HPC cmdlet, see the Help topic for that HPC cmdlet. |
Command-line command | Command-line example | HPC cmdlet | HPC cmdlet example |
---|---|---|---|
|
|
||
|
Get-HpcClusterProperty with the Environment parameter |
|
|
|
Get-HpcClusterProperty with the Parameter parameter |
|
|
cluscfg Maylcred (Windows HPC Server 2008 R2 only) |
|
Set-HpcClusterProperty with the EMaylCredential parameter |
|
|
|
||
|
Set-HpcClusterProperty with the Environment parameter |
|
|
|
Set-HpcClusterProperty with the parameter that has the same name as the cluster-wide parameter that you want to set, that is: |
|
|
|
|
||
|
None |
|
|
|
None |
|
|
|
None |
|
|
hpcfwutil (Windows HPC Server 2008 R2 only) |
|
None |
|
|
|
||
|
Stop-HpcJob, with the job identifier for the running or pending job that you want to cancel specified by the Id parameter |
|
|
job finish (Windows HPC Server 2008 R2 only) |
|
Stop-HpcJob with a value of Finished for the State parameter |
|
|
|
||
|
Get-HpcTask, with the identifier of the job for which you want to list the tasks specified as the value of JobId parameter and then redirect the output to the Format-List (https://go.microsoft.com/fwlink/?LinkId=143534) cmdlet |
|
|
|
|
||
|
|
||
|
Submit-HpcJob, with the job identifier for a job in the Canceled or Failed state that you want to requeue specified as the value for the Id parameter |
|
|
|
|
||
|
Get-HpcJob, with the job identifier for the job for which you want to view information specified as the value for the Id parameter and then redirect the output to the Format-List (https://go.microsoft.com/fwlink/?LinkId=143534s) cmdlet |
|
|
|
|
||
|
|
||
|
None |
|
|
|
None |
|
|
|
None |
|
|
|
|
||
|
Get-HpcJobTemplate, with the name of the job template specified as the value for the Name parameter and then redirect the output to the Format-List (https://go.microsoft.com/fwlink/?LinkId=143534) cmdlet |
|
|
|
None |
|
|
|
None |
|
|
or
|
For Windows HPC Server 2008, Invoke-HpcTest with one of the following values specified for the Name parameter: "MPI Ping-Pong: Quick Check" or "MPI Ping-Pong: Lightweight Throughput" For Windows HPC Server 2008 R2, Invoke-HpcTest with one of the following values specified for the Alias parameter: mpipplatency or mpippthroughput |
For Windows HPC Server 2008:
or
For Windows HPC Server 2008 R2:
or
|
|
|
|
||
|
None |
|
|
node offline (Windows HPC Server 2008 R2 only) |
|
Set-HpcNodeState with a value of Offline specified for the State parameter |
|
node online (Windows HPC Server 2008 R2 only) |
|
Set-HpcNodeState with a value of Online specified for the State parameter |
|
|
Get-HpcNode, with the name of the node for which you want to view information specified as the value of the Name parameter and then redirect the output to the Format-List (https://go.microsoft.com/fwlink/?LinkId=143534) cmdlet |
|
|
node pause (deprecated) |
|
Set-HpcNodeState with a value of Offline specified for the State parameter |
|
node resume (deprecated) |
|
Set-HpcNodeState with a value of Online specified for the State parameter |
|
|
Get-HpcTask with the job and task identifiers specified by the JobId and TaskId parameters to get the HpcTask object for the task, then call the Cancel method for the HpcTask object |
or
|
|
|
Get-HpcTask with the job and task identifiers specified by the JobId and TaskId parameters to get the HpcTask object for the task, then call the Requeue method for the HpcTask object |
or
|
|
|
Get-HpcTask, with the job and task identifiers for the task specified by the JobId and TaskId parameters and the output redirected to the Format-List (https://go.microsoft.com/fwlink/?LinkId=143534) cmdlet |
|
|
test add (Windows HPC Server 2008 R2 only) |
|
|
|
test cancel (Windows HPC Server 2008 R2 only) |
|
|
|
test listruns (Windows HPC Server 2008 R2 only) |
|
|
|
test listtests (Windows HPC Server 2008 R2 only) |
|
|
|
test remove (Windows HPC Server 2008 R2 only) |
|
|
|
test run (Windows HPC Server 2008 R2 only) |
|
|
|
test setcreds (Windows HPC Server 2008 R2 only) |
|
|
|
test viewresult (Windows HPC Server 2008 R2 only) |
|
Run Export-HpcTestResult, then open the exported Report.html file |
Run |
test viewrun (Windows HPC Server 2008 R2 only) |
|
|
|
test viewtest (Windows HPC Server 2008 R2 only) |
|
|
For information about using HPC PowerShell, see Appendix 6: Using HPC PowerShell (https://go.microsoft.com/fwlink/?LinkId=151474).
For information about using Windows PowerShell, see Windows PowerShell (https://go.microsoft.com/fwlink/?LinkId=128257) and Windows PowerShell (TechNet) (https://go.microsoft.com/fwlink/?LinkId=128426).
For information about built-in Windows PowerShell cmdlets, see Windows PowerShell Cmdlet Help Topics (https://go.microsoft.com/fwlink/?LinkId=113277).
See Also
Windows HPC Server 2008 and Windows HPC Server 2008 R2 Command Reference Windows HPC Server 2008 PowerShell Reference Windows HPC Server 2008 R2 PowerShell Reference