Set-CMMsiDeploymentType

Sets a Windows Installer deployment type.

Syntax

Set-CMMsiDeploymentType
   [-AddLanguage <String[]>]
   [-AddRequirement <Rule[]>]
   -Application <IResultObject>
   [-CacheContent <Boolean>]
   [-Comment <String>]
   [-Confirm]
   [-ContentFallback <Boolean>]
   [-ContentLocation <String>]
   -DeploymentTypeName <String>
   [-DisableWildcardHandling]
   [-EnableBranchCache <Boolean>]
   [-EstimatedRuntimeMins <Int32>]
   [-Force]
   [-Force32Bit <Boolean>]
   [-ForceScriptDetection32Bit <Boolean>]
   [-ForceWildcardHandling]
   [-InstallCommand <String>]
   [-InstallWorkingDirectory <String>]
   [-InstallationBehaviorType <InstallationBehaviorType>]
   [-LogonRequirementType <LogonRequirementType>]
   [-MaximumRuntimeMins <Int32>]
   [-NewName <String>]
   [-PassThru]
   [-ProductCode <String>]
   [-RemoveLanguage <String[]>]
   [-RemoveRequirement <Rule[]>]
   [-RequireUserInteraction <Boolean>]
   [-ScriptLanguage <ScriptLanguage>]
   [-ScriptText <String>]
   [-SlowNetworkDeploymentMode <ContentHandlingMode>]
   [-SourceUpdateProductCode <String>]
   [-UninstallCommand <String>]
   [-UninstallWorkingDirectory <String>]
   [-UserInteractionMode <UserInteractionMode>]
   [-WhatIf]
   [<CommonParameters>]
Set-CMMsiDeploymentType [-AddLanguage ] [-AddRequirement ] -ApplicationId 
 [-CacheContent ] [-Comment ] [-Confirm] [-ContentFallback ]
 [-ContentLocation ] -DeploymentTypeName  [-DisableWildcardHandling]
 [-EnableBranchCache ] [-EstimatedRuntimeMins ] [-Force] [-Force32Bit ]
 [-ForceScriptDetection32Bit ] [-ForceWildcardHandling] [-InstallCommand ]
 [-InstallWorkingDirectory ] [-InstallationBehaviorType ]
 [-LogonRequirementType ] [-MaximumRuntimeMins ] [-NewName ] [-PassThru]
 [-ProductCode ] [-RemoveLanguage ] [-RemoveRequirement ]
 [-RequireUserInteraction ] [-ScriptLanguage ] [-ScriptText ]
 [-SlowNetworkDeploymentMode ] [-SourceUpdateProductCode ]
 [-UninstallCommand ] [-UninstallWorkingDirectory ]
 [-UserInteractionMode ] [-WhatIf] []
Set-CMMsiDeploymentType [-AddLanguage ] [-AddRequirement ] -ApplicationName 
 [-CacheContent ] [-Comment ] [-Confirm] [-ContentFallback ]
 [-ContentLocation ] -DeploymentTypeName  [-DisableWildcardHandling]
 [-EnableBranchCache ] [-EstimatedRuntimeMins ] [-Force] [-Force32Bit ]
 [-ForceScriptDetection32Bit ] [-ForceWildcardHandling] [-InstallCommand ]
 [-InstallWorkingDirectory ] [-InstallationBehaviorType ]
 [-LogonRequirementType ] [-MaximumRuntimeMins ] [-NewName ] [-PassThru]
 [-ProductCode ] [-RemoveLanguage ] [-RemoveRequirement ]
 [-RequireUserInteraction ] [-ScriptLanguage ] [-ScriptText ]
 [-SlowNetworkDeploymentMode ] [-SourceUpdateProductCode ]
 [-UninstallCommand ] [-UninstallWorkingDirectory ]
 [-UserInteractionMode ] [-WhatIf] []
Set-CMMsiDeploymentType [-AddLanguage ] [-AddRequirement ] [-CacheContent ]
 [-Comment ] [-Confirm] [-ContentFallback ] [-ContentLocation ]
 [-DisableWildcardHandling] [-EnableBranchCache ] [-EstimatedRuntimeMins ] [-Force]
 [-Force32Bit ] [-ForceScriptDetection32Bit ] [-ForceWildcardHandling]
 -InputObject  [-InstallCommand ] [-InstallWorkingDirectory ]
 [-InstallationBehaviorType ] [-LogonRequirementType ]
 [-MaximumRuntimeMins ] [-NewName ] [-PassThru] [-ProductCode ]
 [-RemoveLanguage ] [-RemoveRequirement ] [-RequireUserInteraction ]
 [-ScriptLanguage ] [-ScriptText ] [-SlowNetworkDeploymentMode ]
 [-SourceUpdateProductCode ] [-UninstallCommand ] [-UninstallWorkingDirectory ]
 [-UserInteractionMode ] [-WhatIf] []

Description

The Set-CMMsiDeploymentType cmdlet changes the settings for a Windows Installer deployment type.

Examples

Example 1: Modify a Windows Installer deployment type

PS C:\> Set-CMMSiDeploymentType -ApplicationName "testMsi" -DeploymentTypeName "DTMsi" -NewName "DTMsi_Updated" -AddLanguage "en-US","zh-CN" -Comment "New Deployment Type-updated" -EstimatedRuntimeMins 14 -LogonRequirementType OnlyWhenNoUserLoggedOn

This command changes the name of the Windows Installer deployment type named DTMsi for the application named testMsi to DTMsi_Updated, adds English and Chinese as supported languages, and adds a description. This command specifies that the installation will take approximately 14 minutes to complete, and will run when no users are logged on.

Example 2: Modify a Windows Installer deployment type by using the pipeline

PS C:\> Get-CMDeploymentType -ApplicationName "testMsi" -DeploymentTypeName "DTMsi_Updated" | Set-CMMsiDeploymentType -NewName "DTMsi" -AddLanguage "en-US","zh-CN" -Comment "New Deployment Type-updated" -EstimatedRuntimeMins 14 -LogonRequirementType OnlyWhenNoUserLoggedOn

This command gets the Windows Installer deployment type object named DTMsi_Updated for the application named testMsi and uses the pipeline operator to pass the object to Set-CMMsiDeploymentType. Set-CMMsiDeploymentType changes the name of the deployment type to DTMsi, adds English and Chinese as supported languages, and adds a description. This command specifies that the installation will take approximately 14 minutes to complete, and will run when no users are logged on.

Required Parameters

-Application

Specifies an application object that is associated with this deployment type. To obtain an application object, use the Get-CMApplication cmdlet.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ApplicationId

Specifies the ID of the application that is associated with this deployment type.

Type:Int32
Aliases:CI_ID, CIId
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ApplicationName

Specifies the name of the application that is associated with this deployment type.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DeploymentTypeName

Specifies a display name for this deployment type.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a deployment type object. To obtain a deployment type object, use the Get-CMDeploymentType cmdlet.

Type:IResultObject
Aliases:DeploymentType
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-AddLanguage

Adds an array of languages that this deployment type supports.

Type:String[]
Aliases:AddLanguages, Languages, Language
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AddRequirement

Adds an array of requirements for this deployment type.

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

Indicates that the deployment type saves content indefinitely in the cache on the client computer.

Type:Boolean
Aliases:PersistContentInClientCache
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Comment

Specifies a description for this deployment type.

Type:String
Aliases:AdministratorComment
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-ContentFallback

Indicates that a client can use a fallback location provided by a management point. A fallback location point provides an alternate location for source content when the content for the deployment type is not available on any of the preferred distribution points.

Type:Boolean
Aliases:EnableContentLocationFallback, AllowClientsToUseFallbackSourceLocationForContent
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ContentLocation

Specifies the path to an msi file. The site system server requires permissions to read the content files.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableBranchCache

Indicates that clients that use Windows BranchCache are allowed to download content from an on-premises distribution point. Content downloads from cloud-based distribution points can always be shared by clients that use Windows BranchCache.

Type:Boolean
Aliases:AllowClientsToShareContentOnSameSubnet
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EstimatedRuntimeMins

Specifies the estimated installation time, in minutes, of the deployment program for the application. This estimate is displayed to the user before the application installs.

Type:Int32
Aliases:EstimatedInstallationTimeMinutes, EstimatedInstallationTimeMins, EstimatedRunTimeMinutes
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Aliases:ForceForUnknownPublisher
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force32Bit

Indicates that the deployment type uses the Microsoft Windows-32-on-Windows-64 (WOW64) subsystem to run the installation on a 64-bit client computer.

Type:Boolean
Aliases:Force32BitInstaller
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceScriptDetection32Bit

Indicates that the deployment type uses the Microsoft Windows-32-on-Windows-64 (WOW64) subsystem to run a script on a 64-bit client computer.

Type:Boolean
Aliases:Force32BitDetectionScript
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InstallCommand

Specifies the command to use to install the Windows Installer package from the command line.

Type:String
Aliases:InstallationProgram
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InstallWorkingDirectory

Specifies the folder that contains the installation program for the deployment type. This folder can be an absolute path on the client, or a path to the distribution point folder that contains the installation files.

Type:String
Aliases:InstallationStartIn, InstallFolder
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InstallationBehaviorType

Specifies the installation behavior of the deployment type. Valid values are: - InstallForSystem

  • InstallForSystemIfResourceIsDeviceOtherwiseInstallForUser
  • InstallForUser
Type:InstallationBehaviorType
Parameter Sets:InstallForUser, InstallForSystem, InstallForSystemIfResourceIsDeviceOtherwiseInstallForUser
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogonRequirementType

Specifies the logon requirement for the deployment type. Valid values are:- OnlyWhenNoUserLoggedOn

  • OnlyWhenUserLoggedOn
  • WhereOrNotUserLoggedOn
  • WhetherOrNotUserLoggedOn
Type:LogonRequirementType
Parameter Sets:OnlyWhenUserLoggedOn, WhereOrNotUserLoggedOn, WhetherOrNotUserLoggedOn, OnlyWhenNoUserLoggedOn
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MaximumRuntimeMins

Specifies the maximum run time, in minutes, of the deployment program for this application.

Type:Int32
Aliases:MaximumAllowedRunTimeMinutes, MaximumAllowedRunTimeMins, MaximumRunTimeMinutes
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewName

Specifies a new name for this deployment type.

Type:String
Aliases:NewDeploymentTypeName
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProductCode

Specifies the product code in the detection method for the deployment type.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveLanguage

Removes the existing supported languages from this deployment type.

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

Removes the existing installation requirements from this deployment type.

Type:Rule[]
Aliases:RemoveRequirements
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RequireUserInteraction

Indicates whether a user can interact with the deployment type installation to configure the installation options.

Type:Boolean
Aliases:RequiresUserInteraction
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ScriptLanguage

Specifies the script language that detects the deployment type. The acceptable values for this parameter are:- PowerShell

  • VBScript
  • JavaScript
Type:ScriptLanguage
Aliases:ScriptType
Parameter Sets:PowerShell, VBScript, JavaScript
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ScriptText

Specifies the script to use to detect this deployment type.

Type:String
Aliases:ScriptContent, Script
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SlowNetworkDeploymentMode

Specifies the installation behavior of the deployment type on a slow network. Valid values are: - DoNothing

  • Download
  • DownloadContentForStreaming
Type:ContentHandlingMode
Parameter Sets:DoNothing, Download
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceUpdateProductCode

Specifies the Windows Installer product code to enable installation source management. Windows Source management enables an MSI represented by this deployment type to be automatically updated or repaired from content source files on an available distribution point.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UninstallCommand

Specifies the command to use to uninstall the Windows Installer package from the command line.

Type:String
Aliases:UninstallationProgram
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UninstallWorkingDirectory

Specifies the folder that contains the uninstall program for the deployment type. This folder can be an absolute path on the client, or a path that is relative to the distribution point folder that contains the package.

Type:String
Aliases:UninstallationStartIn, UninstallFolder
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserInteractionMode

Specifies the mode in which the deployment type runs on client devices. Valid values are: - Normal

  • Minimized
  • Maximized
  • Hidden
Type:UserInteractionMode
Aliases:InstallationProgramVisibility
Parameter Sets:Normal, Minimized, Maximized, Hidden
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False