Set-CMPackage

Changes configuration settings for Configuration Manager packages.

Syntax

Set-CMPackage
   -Id <String>
   [-NewName <String>]
   [-Version <String>]
   [-Manufacturer <String>]
   [-Language <String>]
   [-Description <String>]
   [-Path <String>]
   [-MifFileName <String>]
   [-MifName <String>]
   [-MifPublisher <String>]
   [-MifVersion <String>]
   [-DistributionPointUpdateSchedule <IResultObject>]
   [-DisconnectUserFromDistributionPoint <Boolean>]
   [-DisconnectUserFromDistributionPointRetry <UInt32>]
   [-DisconnectUserFromDistributionPointMins <UInt32>]
   [-CustomPackageShareName <String>]
   [-CopyToPackageShareOnDistributionPoint <Boolean>]
   [-MulticastAllow <Boolean>]
   [-MulticastEncrypt <Boolean>]
   [-MulticastTransferOnly <Boolean>]
   [-Priority <Priorities>]
   [-SendToPreferredDistributionPoint <Boolean>]
   [-PrestageBehavior <PrestageBehavior>]
   [-PersistContentInCache <Boolean>]
   [-EnableBinaryDeltaReplication <Boolean>]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMPackage
   [-InputObject] <IResultObject>
   [-NewName <String>]
   [-Version <String>]
   [-Manufacturer <String>]
   [-Language <String>]
   [-Description <String>]
   [-Path <String>]
   [-MifFileName <String>]
   [-MifName <String>]
   [-MifPublisher <String>]
   [-MifVersion <String>]
   [-DistributionPointUpdateSchedule <IResultObject>]
   [-DisconnectUserFromDistributionPoint <Boolean>]
   [-DisconnectUserFromDistributionPointRetry <UInt32>]
   [-DisconnectUserFromDistributionPointMins <UInt32>]
   [-CustomPackageShareName <String>]
   [-CopyToPackageShareOnDistributionPoint <Boolean>]
   [-MulticastAllow <Boolean>]
   [-MulticastEncrypt <Boolean>]
   [-MulticastTransferOnly <Boolean>]
   [-Priority <Priorities>]
   [-SendToPreferredDistributionPoint <Boolean>]
   [-PrestageBehavior <PrestageBehavior>]
   [-PersistContentInCache <Boolean>]
   [-EnableBinaryDeltaReplication <Boolean>]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMPackage
   -Name <String>
   [-NewName <String>]
   [-Version <String>]
   [-Manufacturer <String>]
   [-Language <String>]
   [-Description <String>]
   [-Path <String>]
   [-MifFileName <String>]
   [-MifName <String>]
   [-MifPublisher <String>]
   [-MifVersion <String>]
   [-DistributionPointUpdateSchedule <IResultObject>]
   [-DisconnectUserFromDistributionPoint <Boolean>]
   [-DisconnectUserFromDistributionPointRetry <UInt32>]
   [-DisconnectUserFromDistributionPointMins <UInt32>]
   [-CustomPackageShareName <String>]
   [-CopyToPackageShareOnDistributionPoint <Boolean>]
   [-MulticastAllow <Boolean>]
   [-MulticastEncrypt <Boolean>]
   [-MulticastTransferOnly <Boolean>]
   [-Priority <Priorities>]
   [-SendToPreferredDistributionPoint <Boolean>]
   [-PrestageBehavior <PrestageBehavior>]
   [-PersistContentInCache <Boolean>]
   [-EnableBinaryDeltaReplication <Boolean>]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-CMPackage cmdlet changes configuration settings for Microsoft System Center Configuration Manager packages.

If you set the MifFileName parameter, System Center Configuration Manager looks in the %TEMP% directory or the %windir% directory for the installation status Management Information Format (MIF) file that you specified in MifFileName. The installation status indicates whether the program successfully ran.

If System Center Configuration Manager does not find the file, it searches for all MIF files in those directories. System Center Configuration Manager 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 System Center Configuration Manager finds a match, it uses the status that the MIF file specifies as the installation status for the program. If System Center Configuration Manager cannot find a match, or if you do not specify MifFileName, System Center Configuration Manager 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.

Examples

Example 1: Rename a package and add a description

PS C:\> Set-CMPackage -Id "ST120001" -NewName "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."

This command renames the package that has the ID ST120001. The command changes the name of the package to ScriptsPackage02 and adds a description for the package.

Example 2: Rename a package by using an object variable

PS C:\> $Pkg = Get-CMPackage -Id ST120001
PS C:\> Set-CMPackage -InputObject $Pkg -Newname "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."

The first command gets the package that has the ID ST120001, and stores the results in the $Pkg variable.

The second command changes the name of the package stored in $Pkg to ScriptsPackage02, and adds a description for the package.

Required Parameters

-Id

Specifies an array of package IDs.

Type:String
Aliases:PackageId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a CMPackage object. To obtain a CMPackage object, use the Get-CMPackage cmdlet.

Type:IResultObject
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies a package name.

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
-CopyToPackageShareOnDistributionPoint
Type:Boolean
Aliases:ShareContent, CopyToPackageShareOnDistributionPoints
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CustomPackageShareName
Type:String
Aliases:ShareName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the package. You can use a maximum of 128 characters.

Type:String
Position:Named
Default value:None
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
-DisconnectUserFromDistributionPoint
Type:Boolean
Aliases:ForceDisconnectEnabled, DisconnectUsersFromDistributionPoints
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisconnectUserFromDistributionPointMins
Type:UInt32
Aliases:ForcedDisconnectDelay, DisconnectUsersFromDistributionPointsMinutes, DisconnectUserFromDistributionPointsMins, DisconnectUserFromDistributionPointsMinutes
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisconnectUserFromDistributionPointRetry
Type:UInt32
Aliases:ForceDisconnectNumRetries, DisconnectUsersFromDistributionPointsRetries
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DistributionPointUpdateSchedule
Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableBinaryDeltaReplication
Type:Boolean
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
-Language

Specifies the language version of the package. You can use a maximum of 32 characters in a format that you choose to use to identify the language version. Configuration Manager uses the Language parameter together with Manufacturer, Name, and Version parameters to identify a package. For example, you can have an English version and a German version of the same package.

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

Specifies a manufacturer name to help you identify the package. You can use a maximum of 32 characters.

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

Specifies the name of the MIF file that contains the package status.

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

Specifies the name of the MIF file that contains the program status for the package. The file name extension must be .mif.

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

Specifies the name of the software publisher of the package.

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

Specifies the version number of the MIF file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MulticastAllow
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MulticastEncrypt
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MulticastTransferOnly
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-NewName

Specifies a new name for the package.

Type:String
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
-Path

Specifies the location of the files of update contents for the package.

You can specify either a full local path or a Universal Naming Convention (UNC) path. Make sure that this location contains all the files and subdirectories that the program needs to run, including any scripts.

Type:String
Aliases:PackageSourcePath
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PersistContentInCache
Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrestageBehavior
Type:PrestageBehavior
Parameter Sets:ManualCopy, DownloadDelta, OnDemand
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Priority

Specifies the priority of the package. The acceptable values for this parameter are:

  • Increase
  • Decrease
Type:Priorities
Aliases:DistributionPriority
Parameter Sets:High, Normal, Low
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SendToPreferredDistributionPoint
Type:Boolean
Aliases:SendToPreferredDistributionPoints
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Version

Specifies a version number for the package.

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