如何為 App-V 載入 Windows PowerShell Cmdlet 並取得 Cmdlet 說明

適用於:

  • Windows 10
  • Windows 11

使用 Windows PowerShell Cmdlet 的需求

本節將說明使用 PowerShell cmdlet 所需的功能。

如何讓使用者存取 PowerShell Cmdlet

您可以透過下列其中一種方法,授與使用者對 PowerShell Cmdlet 的存取權:

  • 在部署和設定 App-V 伺服器時,請指定具有管理 App-V 環境權限的 Active Directory 群組或個別使用者。 如需詳細資訊,請參閱 如何部署 App-V Server。
  • 部署 App-V 伺服器之後,您可以使用 App-V 管理主控台來新增其他 Active Directory 群組或使用者。 如需詳細資訊,請參閱如何使用 Management Console 新增或移除系統管理員。

提升權限的命令提示字元

您需要提升權限的命令提示字元,才能執行下列 Cmdlet:

  • Add-AppvClientPackage
  • Remove-AppvClientPackage
  • Set-AppvClientConfiguration
  • Add-AppvClientConnectionGroup
  • Remove-AppvClientConnectionGroup
  • Add-AppvPublishingServer
  • Remove-AppvPublishingServer
  • Send-AppvClientReport
  • Set-AppvClientMode
  • Set-AppvClientPackage
  • Set-AppvPublishingServer

其他 cmdlet

下列 Cmdlet 是使用者可以執行的 Cmdlet,除非您將其設定為需要提升權限的命令提示字元。

  • Publish-AppvClientPackage
  • Unpublish-AppvClientPackage

若要將這些 Cmdlet 設定為需要提升權限的命令提示字元,請使用下列其中一種方法:

載入 Windows PowerShell Cmdlet

載入 Windows PowerShell Cmdlet 模組:

  1. 在 ISE) (開啟 Windows PowerShell 或Windows PowerShell整合式指令碼環境。
  2. 輸入下列其中一個 Cmdlet,針對您想要的模組載入可用 Cmdlet 清單:
App-V 元件 Cmdlet 可進入
App-V Server 匯入模組 AppvServer
App-V Sequencer 匯入模組 AppvSequencer
App-V 用戶端 匯入模組 AppvClient

取得 Windows PowerShell Cmdlet 的說明

從 App-V 5.0 SP3 開始,Cmdlet 說明提供兩種格式:

  • 作為 PowerShell 中的可下載模組。 若要存取模組,請開啟 Windows PowerShell 或 Windows PowerShell ISE) (整合式指令碼環境,然後輸入下表中的其中一個 cmdlet。
App-V 元件 Cmdlet 可進入
App-V Server Update-Help -Module AppvServer
App-V Sequencer Update-Help -Module AppvSequencer
App-V 用戶端 Update-Help -Module AppvClient

顯示 Windows PowerShell Cmdlet 的說明

若要顯示特定 Windows PowerShell Cmdlet 的說明:

  1. 在 ISE) (開啟 Windows PowerShell 或Windows PowerShell整合式指令碼環境。
  2. 輸入 Get-Help, 後面接著您需要協助的 Cmdlet。 例如:
    Get-Help Publish-AppvClientPackage