Enable-CMProgram

Enables programs in Configuration Manager packages.

Syntax

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

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
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-PackageId

Specifies an array of package IDs.

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

Specifies an array of package names.

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

Specifies an array of program names.

Type:String
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Returns the current working object. By default, this cmdlet does not generate any output.

Type:SwitchParameter
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False