Enable-CMProgram

Enables programs in Configuration Manager packages.

Syntax

Enable-CMProgram
      [-Confirm]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      -InputObject <IResultObject>
      [-PassThru]
      [-WhatIf]
      [<CommonParameters>]
Enable-CMProgram [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] -PackageId  [-PassThru]
 -ProgramName  [-WhatIf] []
Enable-CMProgram [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] -PackageName 
 [-PassThru] -ProgramName  [-WhatIf] []

Description

The Enable-CMProgram cmdlet enables one or more programs in Microsoft System Center Configuration Manager packages. You can enable a program that has been disabled in order to resume availability of that program to client computers. You can also enable a program by enabling an advertisement that you used to disable it.

Programs are commands that are associated with a System Center Configuration Manager package. Programs identify the actions that occur when the client receives the client package. You can associate multiple programs with the same package.

Examples

Example 1: Enable a program

PS C:\>Enable-CMProgram -PackageId "CM400007" -ProgramName "ProgramD02"

This command enables the program named ProgramD02 in the package that has the ID CM400007.

Required Parameters

-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

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

Specifies an array of package IDs.

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

Specifies an array of package names.

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

Specifies an array of program names.

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

Optional Parameters

-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
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
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
-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
-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