Get-CMProgram

Gets programs in Configuration Manager.

Syntax

Get-CMProgram
   -Package <IResultObject>
   [-ProgramName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMProgram
   -PackageId <String>
   [-ProgramName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMProgram
   [-PackageName <String>]
   [-ProgramName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMProgram cmdlet gets one or more programs in Microsoft System Center Configuration Manager. 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: Get all programs

PS C:\> Get-CMProgram

This command gets all programs in System Center Configuration Manager.

Example 2: Get a program by using a name and an ID

PS C:\> Get-CMProgram -PackageId "ST10000F" -ProgramName "ProgramD02"

This command gets the program named ProgramD02 in the package that has the ID ST10000F.

Required Parameters

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

Specifies the package that contains the program by using an ID.

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

Optional Parameters

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

Specifies the program within the package by using a name.

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