共用方式為


Add-CMMsiDeploymentType

新增 Windows Installer 部署類型。

語法

Add-CMMsiDeploymentType
   -ApplicationName <String>
   [-CacheContent]
   [-ContentFallback]
   -ContentLocation <String>
   [-DeploymentTypeName <String>]
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   [-InstallCommand <String>]
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-ProductCode <String>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   -AddDetectionClause <DetectionClause[]>
   -ApplicationId <Int32>
   [-CacheContent]
   [-ContentFallback]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-DetectionClauseConnector <Hashtable[]>]
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-GroupDetectionClauses <String[]>]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   -InstallCommand <String>
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   -AddDetectionClause <DetectionClause[]>
   -ApplicationName <String>
   [-CacheContent]
   [-ContentFallback]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-DetectionClauseConnector <Hashtable[]>]
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-GroupDetectionClauses <String[]>]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   -InstallCommand <String>
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   -AddDetectionClause <DetectionClause[]>
   [-CacheContent]
   [-ContentFallback]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-DetectionClauseConnector <Hashtable[]>]
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-GroupDetectionClauses <String[]>]
   -InputObject <IResultObject>
   [-InstallationBehaviorType <InstallationBehaviorType>]
   -InstallCommand <String>
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   -ApplicationId <Int32>
   [-CacheContent]
   [-ContentFallback]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-ForceScriptDetection32Bit]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   -InstallCommand <String>
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-ScriptFile <String>]
   -ScriptLanguage <ScriptLanguage>
   [-ScriptText <String>]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   -ApplicationId <Int32>
   [-CacheContent]
   [-ContentFallback]
   -ContentLocation <String>
   [-DeploymentTypeName <String>]
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   [-InstallCommand <String>]
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-ProductCode <String>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   -ApplicationName <String>
   [-CacheContent]
   [-ContentFallback]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-ForceScriptDetection32Bit]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   -InstallCommand <String>
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-ScriptFile <String>]
   -ScriptLanguage <ScriptLanguage>
   [-ScriptText <String>]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   [-CacheContent]
   [-ContentFallback]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   [-ForceScriptDetection32Bit]
   -InputObject <IResultObject>
   [-InstallationBehaviorType <InstallationBehaviorType>]
   -InstallCommand <String>
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-ScriptFile <String>]
   -ScriptLanguage <ScriptLanguage>
   [-ScriptText <String>]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-CMMsiDeploymentType
   [-CacheContent]
   [-ContentFallback]
   -ContentLocation <String>
   [-DeploymentTypeName <String>]
   [-EnableBranchCache]
   [-EstimatedRuntimeMins <Int32>]
   [-Force32Bit]
   -InputObject <IResultObject>
   [-InstallationBehaviorType <InstallationBehaviorType>]
   [-InstallCommand <String>]
   [-InstallWorkingDirectory <String>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-ProductCode <String>]
   [-RebootBehavior <PostExecutionBehavior>]
   [-RepairCommand <String>]
   [-RepairWorkingDirectory <String>]
   [-RequireUserInteraction]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallContentLocation <String>]
   [-UninstallOption <UninstallContentSetting>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-AddRequirement <Rule[]>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-AddLanguage <String[]>]
   [-Comment <String>]
   [-Force]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

使用此 Cmdlet 將 Windows Installer (MSI) 部署類型新增至應用程式。

注意事項

從Configuration Manager月臺磁片磁碟機執行 Configuration Manager Cmdlet,例如 PS XYZ:\> 。 如需詳細資訊,請 參閱開始使用

範例

範例 1:新增部署類型

此命令會將名為 DTMsi 的 Windows Installer 部署類型從指定的位置新增至名為 testMsi 的應用程式。 此部署類型支援英文 (美國) () en-US中文 (簡體) () zh-CN

Add-CMMSiDeploymentType -ApplicationName "testMsi" -DeploymentTypeName "DTMsi" -ContentLocation "\\Server1\Applications\MSI\32BitSDK\32BitCompat.msi" -AddLanguage "en-US","zh-CN" -Comment "New Deployment Type"

範例 2:新增偵測方法

此範例會新增需要特定產品識別碼和目錄名稱的偵測子句。

$app = Get-CMApplication -ApplicationName "CentralApp"
$guid = "9900a338-484b-4a18-884e-bce87654ce1b"
$clause1 = New-CMDetectionClauseWindowsInstaller -ProductCode $guid -Value -ExpressionOperator IsEquals -ExpectedValue "1.1.1.1"
$clause2 = New-CMDetectionClauseDirectory -DirectoryName "mymsi" -Path "C:\" -Existence

$app | Add-CMMsiDeploymentType -ContentLocation "\\myserver\mypath\mymsi.msi" -Force -AddDetectionClause ($clause1, $clause2)

參數

-AddDetectionClause

為此部署類型指定偵測方法子句的陣列。 若要建立偵測子句,請使用下列其中一個 Cmdlet:

將這些 Cmdlet 的輸出儲存到變數中。 然後將這些變數指定為此參數的陣列。 例如,-AddDetectionClause $clauseFile1,$clauseFile2,$clauseFile3

您也可以使用 Get-CMDeploymentTypeDetectionClause 從另一個應用程式取得現有的偵測子句。

類型:DetectionClause[]
別名:AddDetectionClauses
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-AddLanguage

指定部署類型支援的語言標記陣列。 例如,若要新增 俄 (俄羅斯) ,請指定 標籤 ru-RU

如需詳細資訊和語言標記清單,請參閱Windows 語言代碼識別碼 (LCID) 參考。

類型:String[]
別名:AddLanguages, Languages, Language
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AddRequirement

-ApplicationId

指定此部署類型的應用程式識別碼。

類型:Int32
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ApplicationName

指定此部署類型的應用程式名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-CacheContent

將此參數設定為 , $true 以無限期地將內容儲存在用戶端快取中。

類型:SwitchParameter
別名:PersistContentInClientCache
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Comment

指定部署類型的選擇性描述。

類型:String
別名:AdministratorComment
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-ContentFallback

如果您將此參數設定為 $true ,當用戶端目前或鄰近界限群組中的任何發佈點上無法使用內容時,用戶端可以使用月臺預設界限群組中的發佈點。

類型:SwitchParameter
別名:EnableContentLocationFallback, AllowClientsToUseFallbackSourceLocationForContent
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ContentLocation

指定 MSI 檔案的網路來源路徑。 月臺系統伺服器需要讀取內容檔案的許可權。

類型:String
別名:InstallationFileLocation
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-DeploymentTypeName

指定此部署類型的顯示名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-DetectionClauseConnector

當您使用 GroupDetectionClauses 參數將偵測子句分組時,請使用此參數來指定連接器。

下列範例會定義 OR 連接器: @{"LogicalName"=$clauseFile3.Setting.LogicalName;"Connector"="OR"}

類型:Hashtable[]
別名:DetectionClauseConnectors
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DisableWildcardHandling

此參數會將萬用字元視為常值字元值。 您無法將其與 ForceWildcardHandling結合。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EnableBranchCache

此參數已被取代。 BranchCache 一律會在用戶端上啟用,如果發佈點支援,則會使用它。

類型:SwitchParameter
別名:AllowClientsToShareContentOnSameSubnet
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EstimatedRuntimeMins

為應用程式指定此部署類型的預估安裝時間,以分鐘為單位。 軟體中心會在應用程式安裝之前,向使用者顯示此估計值。

類型:Int32
別名:EstimatedInstallationTimeMinutes, EstimatedInstallationTimeMins, EstimatedRunTimeMinutes
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Force

強制命令在不要求使用者確認的情況下執行。

類型:SwitchParameter
別名:ForceForUnknownPublisher
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Force32Bit

將此參數設定為 , $true 以在 64 位用戶端上以 32 位進程的方式執行安裝和卸載程式。

類型:SwitchParameter
別名:Force32BitInstaller
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ForceScriptDetection32Bit

如果您使用自訂腳本來偵測此部署類型是否存在,請將此參數 $true 設定為 ,以在 64 位用戶端上以 32 位進程執行腳本。

類型:SwitchParameter
別名:Force32BitDetectionScript
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ForceWildcardHandling

此參數會處理萬用字元,並可能導致非預期的行為 (不建議) 。 您無法將其與 DisableWildcardHandling結合。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-GroupDetectionClauses

當您設定規則來偵測此部署類型是否存在時,請使用此參數來群組子句。 若要建立偵測子句,請使用下列其中一個 Cmdlet:

將這些 Cmdlet 的輸出儲存到變數中。 然後使用下列格式來分組子句: $clause2.Setting.LogicalName, $clause3.Setting.LogicalName

提示

在 Configuration Manager 主控台中,當您選取[群組] 動作時,子句會在群組子句前後顯示括弧。

類型:String[]
別名:GroupDetectionClausesByLogicalName
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

指定要設定的應用程式物件。 若要取得此物件,請使用 Get-CMApplication Cmdlet。

類型:IResultObject
別名:Application
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-InstallationBehaviorType

指定此部署類型的安裝行為:

  • InstallForUser:用戶端只會為您部署應用程式的使用者安裝應用程式。
  • InstallForSystem:用戶端只會安裝應用程式一次。 它可供所有使用者使用。
  • InstallForSystemIfResourceIsDeviceOtherwiseInstallForUser:如果您將應用程式部署到裝置,用戶端會為所有使用者安裝它。 如果您將應用程式部署至使用者,用戶端只會為該使用者安裝它。
類型:InstallationBehaviorType
接受的值:InstallForUser, InstallForSystem, InstallForSystemIfResourceIsDeviceOtherwiseInstallForUser
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InstallCommand

指定安裝程式命令列以安裝 Windows Installer 套件。

類型:String
別名:InstallationProgram
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-InstallWorkingDirectory

指定用戶端執行 InstallCommand時要作為工作目錄的路徑。

類型:String
別名:InstallationStartIn, InstallFolder
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-LogonRequirementType

指定已登入使用者的需求:

  • OnlyWhenNoUserLoggedOn:只有當沒有任何使用者登入 Windows 時。

  • OnlyWhenUserLoggedOn:只有當使用者登入時。 此選項為預設值。

  • WhetherOrNotUserLoggedOn:使用者是否已登入。

    注意事項

    WhereOrNotUserLoggedOn 已被取代。 它會由 WhetherOrNotUserLoggedOn 取代。

如果您將 InstallationBehaviorType 設定為 InstallForUser ,則無法設定此參數。

類型:LogonRequirementType
接受的值:OnlyWhenUserLoggedOn, WhereOrNotUserLoggedOn, WhetherOrNotUserLoggedOn, OnlyWhenNoUserLoggedOn
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-MaximumRuntimeMins

指定此應用程式部署程式允許的執行時間上限。 以分鐘為單位設定整數值。

類型:Int32
別名:MaximumAllowedRunTimeMinutes, MaximumAllowedRunTimeMins, MaximumRunTimeMinutes
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ProductCode

指定要設定為偵測方法的 MSI 產品代碼。 當您使用此參數時,它會覆寫任何其他偵測方法。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RebootBehavior

指定安裝後行為:

  • BasedOnExitCode:根據傳回碼判斷行為。

  • NoAction:沒有特定動作。

  • ProgramReboot:軟體安裝程式可能會強制裝置重新開機。

  • ForceReboot:Configuration Manager用戶端會強制裝置重新開機。

如需這些行為的詳細資訊,請參閱在 Configuration Manager 中建立應用程式

類型:PostExecutionBehavior
接受的值:BasedOnExitCode, NoAction, ForceReboot, ProgramReboot
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RemoveLanguage

指定要從此部署類型移除的支援語言陣列。

類型:String[]
別名:RemoveLanguages
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RemoveRequirement

指定要從此部署類型移除的需求規則陣列。

類型:Rule[]
別名:RemoveRequirements
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RepairCommand

使用此參數來設定修復命令。 同時設定 RepairWorkingDirectory 參數。

從 2006 版開始,您可以指定空字串。

類型:String
別名:RepairProgram
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RepairWorkingDirectory

使用此參數來設定修復命令的工作目錄。 也請設定 RepairCommand 參數。

類型:String
別名:RepairStartIn, RepairFolder
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RequireUserInteraction

將此參數設定為 $true ,可讓使用者檢視部署類型安裝並與其互動。

類型:SwitchParameter
別名:RequiresUserInteraction
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ScriptFile

指定要用來偵測此部署類型的腳本檔案。 也請使用 ScriptLanguage 參數。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ScriptLanguage

如果您使用 ScriptFileScriptText 參數,請使用此參數來指定指令碼語言。

類型:ScriptLanguage
別名:ScriptType
接受的值:PowerShell, VBScript, JavaScript
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ScriptText

指定要偵測此部署類型的腳本文字。 也請使用 ScriptLanguage 參數。

如需詳細資訊,請 參閱關於自訂腳本偵測方法

類型:String
別名:ScriptContent
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SlowNetworkDeploymentMode

當用戶端使用鄰近界限群組或預設月臺界限群組中的發佈點時,請指定部署選項:

  • DoNothing:不要下載內容
  • Download:從發佈點下載內容並在本機執行
類型:ContentHandlingMode
接受的值:DoNothing, Download
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SourceUpdateProductCode

指定 MSI 產品代碼。 此產品代碼為 GUID 格式。

Windows 來源管理可讓此部署類型所代表的.MSI,從可用發佈點上的內容來源檔案自動更新或修復。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UninstallCommand

指定要卸載應用程式的命令列。

從 2006 版開始,您可以指定空字串。

類型:String
別名:UninstallationProgram
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UninstallContentLocation

指定來源內容的網路路徑,以搭配與ContentLocation不同的UninstallCommand使用。 當您將 UninstallOption 設定為 Different 時,請使用此參數。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UninstallOption

指定要搭配 UninstallCommand使用的內容:

  • SameAsInstall:安裝和卸載內容相同。 此選項為預設值。
  • NoneRequired:應用程式不需要卸載內容。
  • Different:卸載內容與安裝內容不同。 使用 UninstallContentLocation 指定用來卸載應用程式之內容的網路路徑。
類型:UninstallContentSetting
接受的值:SameAsInstall, NoneRequired, Different
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UninstallWorkingDirectory

指定用戶端執行 UninstallCommand時要作為工作目錄的路徑。

類型:String
別名:UninstallationStartIn, UninstallFolder
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UserInteractionMode

指定安裝程式可見度:

  • Normal:部署類型會根據系統和程式預設值,以一般模式執行。 此模式為預設值。
  • Minimized:部署類型會在用戶端裝置上最小化執行。 使用者可能會在通知區域或工作列中看到安裝活動。
  • Maximized:部署類型會在用戶端裝置上最大化執行。 使用者會看到所有安裝活動。
  • Hidden:部署類型會在用戶端裝置上隱藏執行。 使用者看不到任何安裝活動。
類型:UserInteractionMode
別名:InstallationProgramVisibility
接受的值:Normal, Minimized, Maximized, Hidden
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 時會發生什麼情況。 Cmdlet 不會執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

輸出

System.Object