Get-CMPackage

Get-CMPackage

Gets Configuration Manager packages.

Syntax

Parameter Set: SearchByName
Get-CMPackage [-Name <String> ] [-SecuredScopeNames <String> ] [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Get-CMPackage -Id <String[]> [-SecuredScopeNames <String> ] [ <CommonParameters>]

Detailed Description

The Get-CMPackage cmdlet gets Microsoft System Center 2012 Configuration Manager packages. System Center 2012 Configuration Manager uses packages to distribute software to clients. You can use the SecuredScopeNames parameter to specify the security scope of a package to get.

Parameters

-Id<String[]>

Specifies an array of package IDs.

Aliases

PackageId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a package.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SecuredScopeNames<String>

Specifies names of security scopes. A security scope name can be Default or the name of a custom-created security scope.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get all packages

This command gets all Configuration Manager packages.

PS C:\> Get-CMPackage

Example 2: Get a package by using an ID

This command gets the program that has the ID CM100002.

PS C:\> Get-CMPackage -ID "CM100002"

Example 3: Get a package by using a name

This command gets the program named Configuration Manager Client Package.

PS C:\> Get-CMPackage -Name "Configuration Manager Client Package"

New-CMPackage

Set-CMPackage

Remove-CMPackage