Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Set-CMPackage
- Module:
- ConfigurationManager Module
Modify a package.
Syntax
SetByValue (Default)
Set-CMPackage
[-InputObject] <IResultObject>
[-CopyToPackageShareOnDistributionPoint <Boolean>]
[-CustomPackageShareName <String>]
[-Description <String>]
[-DisconnectUserFromDistributionPoint <Boolean>]
[-DisconnectUserFromDistributionPointMins <UInt32>]
[-DisconnectUserFromDistributionPointRetry <UInt32>]
[-DistributionPointUpdateSchedule <IResultObject>]
[-EnableBinaryDeltaReplication <Boolean>]
[-Language <String>]
[-Manufacturer <String>]
[-MifFileName <String>]
[-MifName <String>]
[-MifPublisher <String>]
[-MifVersion <String>]
[-MulticastAllow <Boolean>]
[-MulticastEncrypt <Boolean>]
[-MulticastTransferOnly <Boolean>]
[-NewName <String>]
[-PassThru]
[-Path <String>]
[-PersistContentInCache <Boolean>]
[-PrestageBehavior <PrestageBehavior>]
[-Priority <Priorities>]
[-SendToPreferredDistributionPoint <Boolean>]
[-Version <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetById
Set-CMPackage
-Id <String>
[-CopyToPackageShareOnDistributionPoint <Boolean>]
[-CustomPackageShareName <String>]
[-Description <String>]
[-DisconnectUserFromDistributionPoint <Boolean>]
[-DisconnectUserFromDistributionPointMins <UInt32>]
[-DisconnectUserFromDistributionPointRetry <UInt32>]
[-DistributionPointUpdateSchedule <IResultObject>]
[-EnableBinaryDeltaReplication <Boolean>]
[-Language <String>]
[-Manufacturer <String>]
[-MifFileName <String>]
[-MifName <String>]
[-MifPublisher <String>]
[-MifVersion <String>]
[-MulticastAllow <Boolean>]
[-MulticastEncrypt <Boolean>]
[-MulticastTransferOnly <Boolean>]
[-NewName <String>]
[-PassThru]
[-Path <String>]
[-PersistContentInCache <Boolean>]
[-PrestageBehavior <PrestageBehavior>]
[-Priority <Priorities>]
[-SendToPreferredDistributionPoint <Boolean>]
[-Version <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByName
Set-CMPackage
-Name <String>
[-CopyToPackageShareOnDistributionPoint <Boolean>]
[-CustomPackageShareName <String>]
[-Description <String>]
[-DisconnectUserFromDistributionPoint <Boolean>]
[-DisconnectUserFromDistributionPointMins <UInt32>]
[-DisconnectUserFromDistributionPointRetry <UInt32>]
[-DistributionPointUpdateSchedule <IResultObject>]
[-EnableBinaryDeltaReplication <Boolean>]
[-Language <String>]
[-Manufacturer <String>]
[-MifFileName <String>]
[-MifName <String>]
[-MifPublisher <String>]
[-MifVersion <String>]
[-MulticastAllow <Boolean>]
[-MulticastEncrypt <Boolean>]
[-MulticastTransferOnly <Boolean>]
[-NewName <String>]
[-PassThru]
[-Path <String>]
[-PersistContentInCache <Boolean>]
[-PrestageBehavior <PrestageBehavior>]
[-Priority <Priorities>]
[-SendToPreferredDistributionPoint <Boolean>]
[-Version <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use this cmdlet to change the settings of a package. For more information, see Packages and programs in Configuration Manager.
Note
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.
$pkg = Get-CMPackage -Id "ST120001"
Set-CMPackage -InputObject $pkg -Path "\\sources\cmpkg$\newpkg01"
Parameters
-Confirm
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
-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.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ShareContent, CopyToPackageShareOnDistributionPoints |
Parameter sets
-CustomPackageShareName
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
-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
-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
-DisconnectUserFromDistributionPoint
This option is deprecated. It sets the ForcedDisconnectEnabled property of the driver package.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ForceDisconnectEnabled, DisconnectUsersFromDistributionPoints |
Parameter sets
-DisconnectUserFromDistributionPointMins
This option is deprecated. It sets the ForcedDisconnectDelay property of the driver package.
Parameter properties
| Type: | UInt32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ForcedDisconnectDelay, DisconnectUsersFromDistributionPointsMinutes, DisconnectUserFromDistributionPointsMins, DisconnectUserFromDistributionPointsMinutes |
Parameter sets
-DisconnectUserFromDistributionPointRetry
This option is deprecated. It sets the ForcedDisconnectNumRetries property of the driver package.
Parameter properties
| Type: | UInt32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ForceDisconnectNumRetries, DisconnectUsersFromDistributionPointsRetries |
Parameter sets
-DistributionPointUpdateSchedule
Use this parameter to update distribution points on a schedule. To get a schedule object, use the New-CMSchedule cmdlet.
Parameter properties
| Type: | IResultObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-EnableBinaryDeltaReplication
Set this parameter to $true to enable binary differential replication (BDR). For more information, see Fundamental concepts for content management in Configuration Manager.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ForceWildcardHandling
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
-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
-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
-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
-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
-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
-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
-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
-MifVersion
Specify the version number 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
-MulticastAllow
Set this parameter to $true to allow this package to be transferred via multicast. For more information, see Use multicast to deploy Windows over the network with Configuration Manager.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MulticastEncrypt
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
-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
-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
-NewName
Use this parameter to rename a package.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-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
-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
-PrestageBehavior
Specify the behavior when you enable a distribution point for prestaged content:
ManualCopy: Manually copy the content in this package to the distribution pointDownloadDelta: Download only content changes to the distribution pointOnDemand: Automatically download content when packages are assigned to distribution points
For more information, see Use prestaged content.
Parameter properties
| Type: | PrestageBehavior |
| Default value: | None |
| Accepted values: | ManualCopy, DownloadDelta, OnDemand |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Priority
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
-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
-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
-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
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.
Inputs
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
Outputs
System.Object
Related Links
Feedback
Was this page helpful?
