Enable HPC PowerShell with the Client Redistributable Package

更新时间: 2014年7月

应用到: Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2

Starting with HPC Pack 2012, the HPC 包 client redistributable package installs HPC Job Manager and command-line commands but does not enable the Windows HPC PowerShell job submission cmdlets for use by default. If you want to run the HPC PowerShell job submission cmdlets on a client computer, you have the following two options:

  • Install the HPC 包 client utilities from the freely available HPC 包 installation files. This installs HPC Cluster Manager, HPC Job Manager, and the HPC PowerShell cmdlets on the computer. You can download a recent version of HPC 包 from the Microsoft Download Center.

    If you already installed HPC 包 client components by using the redistributable package, first uninstall the components before running the HPC 包 Installation Wizard.

  • Alternatively, install the HPC 包 client redistributable package, and then complete the configuration of the HPC PowerShell job submission cmdlets by using the following steps.

  1. To register the HPC PowerShell assembly, at an elevated command prompt, type a command similar to the following:

    %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\installutil.exe "C:\Program Files\Microsoft HPC Pack 2012\Bin\CCPPSH.Azure.dll"
    The path to installutil.exe will depend on the architecture of the Windows operating system running on your computer.

  2. To verify that the snap-in is registered, start Windows PowerShell as an administrator and type the following:

    get-pssnapin -registered

    The cmdlet should return a snap-in named Microsoft.HPC. Make a note of the PSVersion (Windows PowerShell version) for this snap-in.

  3. To add the snap-in, do one of the following, depending on the value of PSVersion.

    1. If the PSVersion value is greater than 3, type the following to add the snap-in:

      Add-PSSnapIn Microsoft.HPC
    2. If the PSVersion value is less than or equal to 3, run the following two commands that set the activation policy and then add the snap-in:

      set COMPLUS_ApplicationMigrationRuntimeActivationConfigPath=%CCP_HOME%\bin
      %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command "Add-PSSnapIn Microsoft.HPC"
      For more information, see Activation Configuration Files.

  • The Windows HPC PowerShell job submission cmdlets that can be enabled with the HPC 包 client redistributable package are a subset of the cmdlets that are installed with the HPC 包 Installation Wizard on the head node or on client computers. The latter set also includes cmdlets for cluster administration and management.