Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-CMPackage

Creates a Configuration Manager package.

Syntax

New (Default)

New-CMPackage
 -Name <String>
 [-Description <String>]
 [-Language <String>]
 [-Manufacturer <String>]
 [-Path <String>]
 [-Version <String>]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

NewPackageByDefinitionNoSourceFileWithExisted

New-CMPackage
 -PackageDefinitionName <String>
 [-FromDefinition]
 [-PackageNoSourceFile]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

NewPackageByDefinitionNoSourceFileWithNew

New-CMPackage
 -PackagePath <String>
 [-FromDefinition]
 [-PackageNoSourceFile]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

NewPackageByDefinitionSourceFileWithExisted

New-CMPackage
 -PackageDefinitionName <String>
 -SourceFileType <SourceFileType>
 -SourceFolderPath <String>
 -SourceFolderPathType <SourceFolderPathType>
 [-FromDefinition]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

NewPackageByDefinitionSourceFileWithNew

New-CMPackage
 -PackagePath <String>
 -SourceFileType <SourceFileType>
 -SourceFolderPath <String>
 -SourceFolderPathType <SourceFolderPathType>
 [-FromDefinition]
 [-DisableWildcardHandling]
 [-ForceWildcardHandling]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The New-CMPackage cmdlet creates a Configuration Manager package. A package is a Configuration Manager object that contains the content files and instructions for distributing programs, software updates, boot images, operating system images, and drivers to Configuration Manager clients.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Create a package

PS XYZ:\> New-CMPackage -Name "ScriptsPackage01"

This command creates a Configuration Manager package named ScriptsPackage01.

Example 2: Create a package and add a description

PS XYZ:\> New-CMPackage -Name "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."

This command creates a Configuration Manager package named ScriptsPackage02 and adds the specified description to the package.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-Description

Specifies a description for the package. 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

-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

-FromDefinition

Indicates that Configuration Manager creates the package from a package definition file.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-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 to identify a package. 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

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

Specifies a name for the package.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PackageDefinitionName

Specifies the name of a package definition file.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PackageNoSourceFile

Indicates that the package does not require source files to be present on client devices.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PackagePath

Specifies a share name or path that Configuration Manager creates for the package source files on distribution points.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Path

Specifies the location of the files to add to the package.

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:PackageSourcePath

Parameter sets

-SourceFileType

Specifies the source file type. The acceptable values for this parameter are:

  • AlwaysObtainSourceFile
  • CreateCompressedVersionOfSourceFile

Parameter properties

Type:SourceFileType
Default value:None
Accepted values:AlwaysObtainSourceFile, CreateCompressedVersionOfSourceFile
Supports wildcards:False
DontShow:False

Parameter sets

-SourceFolderPath

Specifies the location of the source files for the package.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SourceFolderPathType

Specifies the source folder path type. The acceptable values for this parameter are:

  • LocalFolderOnSiteServer
  • UncNetworkPath

Parameter properties

Type:SourceFolderPathType
Default value:None
Accepted values:UncNetworkPath, LocalFolderOnSiteServer
Supports wildcards:False
DontShow:False

Parameter sets

-Version

Specifies a version number for the package.

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

None

Outputs

IResultObject

Related Links


Feedback

Was this page helpful?