Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.
Examples
Example 1: Rename a package and add a description
This command renames the package that has the ID ST120001 to ScriptsPackage02 and adds a description.
Set-CMPackage -Id "ST120001" -NewName "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."
Example 2: Change the package source path
The first command gets the package that has the ID ST120001, and stores the results in the $Pkg variable. The second command changes the package source path.
Add this parameter to prompt for confirmation before the cmdlet runs.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CopyToPackageShareOnDistributionPoint
Clients can always download a package from a distribution point. If you set this parameter to $true, the site makes it available via a named network share on distribution points. Use CustomPackageShareName to specify a custom share name.
When you enable this option, more space is required on distribution points. It applies to all distribution points to which you distribute this package.
If you enable CopyToPackageShareOnDistributionPoint, you can use this parameter to customize the share name. The maximum length is 127 characters, and can't include any of the following characters: " / [ ] : | < > + = ; , ? *. You can specify a share name and a folder name, but then the maximum for each is 80 characters. For example, ShareName\FolderName.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
ShareName
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Description
Specify an optional description of the package to help you identify it. You can use a maximum of 128 characters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisconnectUserFromDistributionPoint
This option is deprecated. It sets the ForcedDisconnectEnabled property of the driver package.
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Id
Specify the ID of a package to configure. This value is a standard package ID, for example: XYZ00020.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
PackageId
Parameter sets
SetById
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InputObject
Specify a package object to configure. To get this object, use the Get-CMPackage cmdlet.
Parameter properties
Type:
IResultObject
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetByValue
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Language
Specify a language string for the package. You can use a maximum of 32 characters in a format that you choose to use to identify the language version. To identify a package, Configuration Manager uses the Language, Manufacturer, Name, and Version parameters. For example, you can have an English version and a German version of the same package.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Manufacturer
Specify the manufacturer name for the software. You can use a maximum of 32 characters. To identify a package, Configuration Manager uses the Language, Manufacturer, Name, and Version parameters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MifFileName
Specify the name of the Management Information Format (MIF) file that contains the package status. The file name extension must be .mif. Use a status MIF file to generate detailed status reporting. To generate a status MIF file, your application must call the InstallStatusMIF function. For more information, see Status MIF Functions.
If you set this parameter, when the client runs the deployment, the Configuration Manager client looks in the %TEMP% directory or the %windir% directory for the installation status MIF file that you specify. The installation status indicates whether the program successfully ran.
If the client doesn't find the file, it searches for all MIF files in those directories. It makes a case-insensitive comparison of the values that you specify for MifName, MifPublisher, and MifVersion to the values that the MIF file specifies. If the client finds a match, it uses the status that the MIF file specifies as the installation status for the program. If it can't find a match, or if you don't specify MifFileName, the client uses the program exit code to set the installation status for the program. An exit code of zero indicates that the program successfully ran. Any other values indicate application-specific error codes.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MifName
Specify the name of the package for MIF matching, up to 50 characters. For more information, see the MifFileName parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MifPublisher
Specify the software publisher of the package for MIF matching, up to 32 characters. For more information, see the MifFileName parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MifVersion
Specify the version number of the package for MIF matching, up to 32 characters. For more information, see the MifFileName parameter.
If you enable MulticastAllow, set this parameter to $true to encrypt multicast packages.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MulticastTransferOnly
If you enable MulticastAllow, set this parameter to $true to only transfer this driver package via multicast.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specify a package name. You can use a maximum of 250 characters. To identify a package, Configuration Manager uses the Language, Manufacturer, Name, and Version parameters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
SetByName
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NewName
Use this parameter to rename a package.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Path
If the package contains source files, specify the ___location of the files. You can specify either a full local path on the site server, or a network path. Make sure that this ___location contains all the files and subdirectories that the program needs to run, including any scripts.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
PackageSourcePath
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PersistContentInCache
If you don't want the content of this package to age out of the client cache to make room for other content, set this parameter to $true to persist it in the client cache.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PrestageBehavior
Specify the behavior when you enable a distribution point for prestaged content:
ManualCopy: Manually copy the content in this package to the distribution point
DownloadDelta: Download only content changes to the distribution point
OnDemand: Automatically download content when packages are assigned to distribution points
Specify the order in which the site sends the content to other sites and the distribution points in this site.
The site sends high priority content before packages with normal or low priority. Packages with equal priority are sent in the order in which they're created.
Parameter properties
Type:
Priorities
Default value:
None
Accepted values:
High, Normal, Low
Supports wildcards:
False
DontShow:
False
Aliases:
DistributionPriority
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SendToPreferredDistributionPoint
If you want to enable on-demand content distribution to preferred distribution points, set this parameter to $true. When you enable this setting, if a client requests the content for the package and the content isn't available on any distribution points, then the management point distributes the content. For more information, see On-demand content distribution.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
SendToPreferredDistributionPoints
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Version
Specify a version number for the software. The maximum length of this string is 32 characters. To identify a package, Configuration Manager uses the Language, Manufacturer, Name, and Version parameters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet doesn't run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.