Edit

Share via


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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

New
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

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

NewPackageByDefinitionNoSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionNoSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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 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

New
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

New
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies a name for the package.

Parameter properties

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

Parameter sets

New
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PackageDefinitionName

Specifies the name of a package definition file.

Parameter properties

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

Parameter sets

NewPackageByDefinitionNoSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

NewPackageByDefinitionNoSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionNoSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

NewPackageByDefinitionNoSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

New
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

NewPackageByDefinitionSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

NewPackageByDefinitionSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

NewPackageByDefinitionSourceFileWithExisted
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
NewPackageByDefinitionSourceFileWithNew
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Version

Specifies a version number for the package.

Parameter properties

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

Parameter sets

New
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.

Inputs

None

Outputs

IResultObject