Skip to content

Latest commit

 

History

History
787 lines (591 loc) · 23.8 KB

Set-CMTaskSequenceDeploymentType.md

File metadata and controls

787 lines (591 loc) · 23.8 KB
external help file Module Name ms.date online version schema
AdminUI.PS.dll-Help.xml
ConfigurationManager
08/02/2021
2.0.0

Set-CMTaskSequenceDeploymentType

SYNOPSIS

Configure a task sequence deployment type on an application.

SYNTAX

ByAppName (Default)

Set-CMTaskSequenceDeploymentType [-AddDetectionClause <DetectionClause[]>]
 [-DetectionClauseConnector <Hashtable[]>] [-EstimatedRuntimeMins <Int32>]
 [-ForceScriptDetection32Bit <Boolean>] [-GroupDetectionClauses <String[]>]
 [-InstallationBehaviorType <InstallationBehaviorType>] -InstallTaskSequenceId <String>
 [-LogonRequirementType <LogonRequirementType>] [-MaximumRuntimeMins <Int32>] [-ProductCode <String>]
 [-RebootBehavior <PostExecutionBehavior>] [-RemoveDetectionClause <String[]>]
 [-RequireUserInteraction <Boolean>] [-ScriptFile <String>] [-ScriptLanguage <ScriptLanguage>]
 [-ScriptText <String>] [-SlowNetworkDeploymentMode <ContentHandlingMode>] [-UninstallTaskSequenceId <String>]
 [-UserInteractionMode <UserInteractionMode>] [-AddRequirement <Rule[]>] -ApplicationName <String>
 -DeploymentTypeName <String> [-NewName <String>] [-PassThru] [-RemoveLanguage <String[]>]
 [-RemoveRequirement <Rule[]>] [-AddLanguage <String[]>] [-Comment <String>] [-Force]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

ByAppValue

Set-CMTaskSequenceDeploymentType [-AddDetectionClause <DetectionClause[]>]
 [-DetectionClauseConnector <Hashtable[]>] [-EstimatedRuntimeMins <Int32>]
 [-ForceScriptDetection32Bit <Boolean>] [-GroupDetectionClauses <String[]>]
 [-InstallationBehaviorType <InstallationBehaviorType>] -InstallTaskSequenceId <String>
 [-LogonRequirementType <LogonRequirementType>] [-MaximumRuntimeMins <Int32>] [-ProductCode <String>]
 [-RebootBehavior <PostExecutionBehavior>] [-RemoveDetectionClause <String[]>]
 [-RequireUserInteraction <Boolean>] [-ScriptFile <String>] [-ScriptLanguage <ScriptLanguage>]
 [-ScriptText <String>] [-SlowNetworkDeploymentMode <ContentHandlingMode>] [-UninstallTaskSequenceId <String>]
 [-UserInteractionMode <UserInteractionMode>] [-AddRequirement <Rule[]>] -Application <IResultObject>
 -DeploymentTypeName <String> [-NewName <String>] [-PassThru] [-RemoveLanguage <String[]>]
 [-RemoveRequirement <Rule[]>] [-AddLanguage <String[]>] [-Comment <String>] [-Force]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

ByAppId

Set-CMTaskSequenceDeploymentType [-AddDetectionClause <DetectionClause[]>]
 [-DetectionClauseConnector <Hashtable[]>] [-EstimatedRuntimeMins <Int32>]
 [-ForceScriptDetection32Bit <Boolean>] [-GroupDetectionClauses <String[]>]
 [-InstallationBehaviorType <InstallationBehaviorType>] -InstallTaskSequenceId <String>
 [-LogonRequirementType <LogonRequirementType>] [-MaximumRuntimeMins <Int32>] [-ProductCode <String>]
 [-RebootBehavior <PostExecutionBehavior>] [-RemoveDetectionClause <String[]>]
 [-RequireUserInteraction <Boolean>] [-ScriptFile <String>] [-ScriptLanguage <ScriptLanguage>]
 [-ScriptText <String>] [-SlowNetworkDeploymentMode <ContentHandlingMode>] [-UninstallTaskSequenceId <String>]
 [-UserInteractionMode <UserInteractionMode>] [-AddRequirement <Rule[]>] -ApplicationId <Int32>
 -DeploymentTypeName <String> [-NewName <String>] [-PassThru] [-RemoveLanguage <String[]>]
 [-RemoveRequirement <Rule[]>] [-AddLanguage <String[]>] [-Comment <String>] [-Force]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

ByDTValue

Set-CMTaskSequenceDeploymentType [-AddDetectionClause <DetectionClause[]>]
 [-DetectionClauseConnector <Hashtable[]>] [-EstimatedRuntimeMins <Int32>]
 [-ForceScriptDetection32Bit <Boolean>] [-GroupDetectionClauses <String[]>]
 [-InstallationBehaviorType <InstallationBehaviorType>] -InstallTaskSequenceId <String>
 [-LogonRequirementType <LogonRequirementType>] [-MaximumRuntimeMins <Int32>] [-ProductCode <String>]
 [-RebootBehavior <PostExecutionBehavior>] [-RemoveDetectionClause <String[]>]
 [-RequireUserInteraction <Boolean>] [-ScriptFile <String>] [-ScriptLanguage <ScriptLanguage>]
 [-ScriptText <String>] [-SlowNetworkDeploymentMode <ContentHandlingMode>] [-UninstallTaskSequenceId <String>]
 [-UserInteractionMode <UserInteractionMode>] [-AddRequirement <Rule[]>] -InputObject <IResultObject>
 [-NewName <String>] [-PassThru] [-RemoveLanguage <String[]>] [-RemoveRequirement <Rule[]>]
 [-AddLanguage <String[]>] [-Comment <String>] [-Force] [-DisableWildcardHandling] [-ForceWildcardHandling]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Applies to version 2006 and later. Use this cmdlet to configure a task sequence deployment type on an application. For more information, see Task sequence deployment type.

This cmdlet has similar syntax as the MSI deployment type cmdlet Set-CMMsiDeploymentType. The primary differences are the following parameters:

  • -InstallTaskSequenceId <string> (required): the ID of the task sequence to install the app

  • -UninstallTaskSequenceId <string> (optional): the ID of the task sequence to uninstall the app

These two parameters relate to the deployment type task sequence options. They replace the -InstallCommand and -UninstallCommand parameters on the MSI cmdlet.

EXAMPLES

Example 1: Modify a task sequence deployment type

This command changes the name of the deployment type from Complex install to Advanced install. It adds English (United States) (en-US) and Chinese (Simplified) (zh-CN) as supported languages. It specifies that the installation will take approximately 14 minutes to complete, and will only run when no users are signed into Windows.

Set-CMMSiDeploymentType -ApplicationName "CBI" -DeploymentTypeName "Complex install" -NewName "Advanced install" -AddLanguage "en-US","zh-CN" -Comment "New Deployment Type-updated" -EstimatedRuntimeMins 14 -LogonRequirementType OnlyWhenNoUserLoggedOn

For other examples with requirement rules and detection methods, see Set-CMScriptDeploymentType and Add-CMMsiDeploymentType.

PARAMETERS

-AddDetectionClause

Specify an array of detection method clauses for this deployment type. To create a detection clause, use one of the following cmdlets:

Save the output of these cmdlets into a variable. Then specify those variables as an array for this parameter. For example, -AddDetectionClause $clauseFile1,$clauseFile2,$clauseFile3.

You can also use Get-CMDeploymentTypeDetectionClause to get an existing detection clause from another application.

Type: DetectionClause[]
Parameter Sets: (All)
Aliases: AddDetectionClauses

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AddLanguage

Specify an array of language tags that the deployment type supports. For example, to add Russian (Russia), specify the tag ru-RU.

For more information and a list of language tags, see Windows Language Code Identifier (LCID) Reference.

Type: String[]
Parameter Sets: (All)
Aliases: AddLanguages, Languages, Language

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AddRequirement

Specify an array of requirement objects for the deployment type. To create a requirement rule object, use one of the following cmdlets:

Starting in version 2111, you can use the Get-CMDeploymentTypeRequirement cmdlet to copy rules from another deployment type.

Type: Rule[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Application

Specify an application object for this deployment type. To get this object, use the Get-CMApplication cmdlet.

Type: IResultObject
Parameter Sets: ByAppValue
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationId

Specify the ID of the application for this deployment type.

Type: Int32
Parameter Sets: ByAppId
Aliases: CI_ID, CIId

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationName

Specify the name of the application for this deployment type.

Type: String
Parameter Sets: ByAppName
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Comment

Specify an optional description for the deployment type.

Type: String
Parameter Sets: (All)
Aliases: AdministratorComment

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeploymentTypeName

Specify the name of the deployment type to configure.

Type: String
Parameter Sets: ByAppName, ByAppValue, ByAppId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DetectionClauseConnector

When you use the GroupDetectionClauses parameter to group detection clauses, use this parameter to specify the connector.

The following example defines the OR connector: @{"LogicalName"=$clauseFile3.Setting.LogicalName;"Connector"="OR"}

Type: Hashtable[]
Parameter Sets: (All)
Aliases: DetectionClauseConnectors

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EstimatedRuntimeMins

Specify the estimated installation time, in minutes, of this deployment type for the application. Software Center displays this estimate to the user before the application installs.

Type: Int32
Parameter Sets: (All)
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
Parameter Sets: (All)
Aliases: ForceForUnknownPublisher

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceScriptDetection32Bit

If you use a custom script to detect the presence of this deployment type, set this parameter to $true to run the script as a 32-bit process on 64-bit clients.

Type: Boolean
Parameter Sets: (All)
Aliases: Force32BitDetectionScript

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupDetectionClauses

When you configure rules to detect the presence of this deployment type, use this parameter to group clauses. To create a detection clause, use one of the following cmdlets:

Save the output of these cmdlets into a variable. Then use the following format to group clauses: $clause2.Setting.LogicalName, $clause3.Setting.LogicalName.

Tip

In the Configuration Manager console, when you select the Group action, the clauses show parentheses before and after the grouped clauses.

Type: String[]
Parameter Sets: (All)
Aliases: GroupDetectionClausesByLogicalName

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject

Specify a deployment type object to configure. To get this object, use the Get-CMDeploymentType cmdlet.

Type: IResultObject
Parameter Sets: ByDTValue
Aliases: DeploymentType

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

-InstallationBehaviorType

Specify the installation behavior for this deployment type:

  • InstallForUser: The client only installs the application for the user to whom you deploy the application.
  • InstallForSystem: The client installs the application only once. It's available to all users.
  • InstallForSystemIfResourceIsDeviceOtherwiseInstallForUser: If you deploy the application to a device, the client installs it for all users. If you deploy the application to a user, the client only installs it for that user.
Type: InstallationBehaviorType
Parameter Sets: (All)
Aliases:
Accepted values: InstallForUser, InstallForSystem, InstallForSystemIfResourceIsDeviceOtherwiseInstallForUser

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstallTaskSequenceId

The ID of the task sequence to install the app.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogonRequirementType

Specify the requirement for a signed-in user:

  • OnlyWhenNoUserLoggedOn: Only when no user is signed into Windows.

  • OnlyWhenUserLoggedOn: Only when a user is signed in. This option is the default.

  • WhetherOrNotUserLoggedOn: Whether or not a user is signed in.

    [!NOTE] The value WhereOrNotUserLoggedOn is deprecated. It's replaced by WhetherOrNotUserLoggedOn.

If you set InstallationBehaviorType to InstallForUser, then you can't set this parameter.

Type: LogonRequirementType
Parameter Sets: (All)
Aliases:
Accepted values: OnlyWhenUserLoggedOn, WhereOrNotUserLoggedOn, WhetherOrNotUserLoggedOn, OnlyWhenNoUserLoggedOn

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumRuntimeMins

Specify the maximum allowed run time of the deployment program for this application. Set an integer value in minutes.

Type: Int32
Parameter Sets: (All)
Aliases: MaximumAllowedRunTimeMinutes, MaximumAllowedRunTimeMins, MaximumRunTimeMinutes

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewName

Specify a new name to rename this deployment type.

Type: String
Parameter Sets: (All)
Aliases: NewDeploymentTypeName

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductCode

If the application uses Windows Installer technology, specify an MSI product code to set as the detection method. When you use this parameter, it overwrites any existing detection methods.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RebootBehavior

Specify the post-installation behavior:

  • BasedOnExitCode: Determine behavior based on return codes.

  • NoAction: No specific action.

  • ProgramReboot: The software install program might force a device restart.

  • ForceReboot: Configuration Manager client will force a mandatory device restart.

For more information on these behaviors, see Create applications in Configuration Manager.

Type: PostExecutionBehavior
Parameter Sets: (All)
Aliases:
Accepted values: BasedOnExitCode, NoAction, ForceReboot, ProgramReboot

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveDetectionClause

Specify an array of detection method clauses to remove.

Type: String[]
Parameter Sets: (All)
Aliases: RemoveDetectionClauses

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveLanguage

Specify an array of supported languages to remove from this deployment type.

Type: String[]
Parameter Sets: (All)
Aliases: RemoveLanguages

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveRequirement

Specify an array of requirement rules to remove from this deployment type.

Type: Rule[]
Parameter Sets: (All)
Aliases: RemoveRequirements

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequireUserInteraction

Set this parameter to $true to allow users to view and interact with the deployment type installation.

Type: Boolean
Parameter Sets: (All)
Aliases: RequiresUserInteraction

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptFile

Specify the script file to use to detect this deployment type. Also use the ScriptLanguage parameter.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptLanguage

If you use the ScriptFile or ScriptText parameters, use this parameter to specify the script language.

Type: ScriptLanguage
Parameter Sets: (All)
Aliases: ScriptType
Accepted values: PowerShell, VBScript, JavaScript

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScriptText

Specify the text of a script to detect this deployment type. Also use the ScriptLanguage parameter.

For more information, see About custom script detection methods.

Type: String
Parameter Sets: (All)
Aliases: ScriptContent, Script

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SlowNetworkDeploymentMode

When a client uses a distribution point from a neighbor boundary group or the default site boundary group, specify the deployment option:

  • DoNothing: Don't download content
  • Download: Download content from the distribution point and run locally
Type: ContentHandlingMode
Parameter Sets: (All)
Aliases:
Accepted values: DoNothing, Download

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UninstallTaskSequenceId

The ID of the task sequence to uninstall the app.

Type: String
Parameter Sets: (All)
Aliases: ContentLocation, UninstallId

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserInteractionMode

Specify the installation program visibility:

  • Normal: The deployment type runs in the normal mode based on system and program defaults. This mode is the default.
  • Minimized: The deployment type runs minimized on client devices. Users might see the installation activity in the notification area or taskbar.
  • Maximized: The deployment type runs maximized on client devices. Users see all installation activity.
  • Hidden: The deployment type runs hidden on client devices. Users see no installation activity.
Type: UserInteractionMode
Parameter Sets: (All)
Aliases: InstallationProgramVisibility
Accepted values: Normal, Minimized, Maximized, Hidden

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
Parameter Sets: (All)
Aliases: cf

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 doesn't run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

OUTPUTS

System.Object

NOTES

RELATED LINKS

Add-CMTaskSequenceDeploymentType

Get-CMDeploymentType

Remove-CMDeploymentType

Get-CMApplication

Task sequence deployment type