New-CMPackage

Creates a Configuration Manager package.

Syntax

New-CMPackage
   [-Confirm]
   [-Description <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-Language <String>]
   [-Manufacturer <String>]
   -Name <String>
   [-Path <String>]
   [-Version <String>]
   [-WhatIf]
   [<CommonParameters>]
New-CMPackage [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] [-FromDefinition]
 -PackageDefinitionName  [-PackageNoSourceFile] [-WhatIf] []
New-CMPackage [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] [-FromDefinition]
 -PackageDefinitionName  -SourceFileType  -SourceFolderPath 
 -SourceFolderPathType  [-WhatIf] []
New-CMPackage [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] [-FromDefinition]
 [-PackageNoSourceFile] -PackagePath  [-WhatIf] []
New-CMPackage [-Confirm] [-DisableWildcardHandling] [-ForceWildcardHandling] [-FromDefinition]
 -PackagePath  -SourceFileType  -SourceFolderPath 
 -SourceFolderPathType  [-WhatIf] []

Description

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

Examples

Example 1: Create a package

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

This command creates a Configuration Manager package named ScriptsPackage01.

Example 2: Create a package and add a description

PS C:\> 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.

Required Parameters

-FromDefinition

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

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies a name for the package.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PackageDefinitionName

Specifies the name of a package definition file.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PackageNoSourceFile

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

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PackagePath

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

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceFileType

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

  • CreateCompressedVersionOfSourceFile
Type:SourceFileType
Parameter Sets:AlwaysObtainSourceFile, CreateCompressedVersionOfSourceFile
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceFolderPath

Specifies the location of the source files for the package.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceFolderPathType

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

  • UncNetworkPath
Type:SourceFolderPathType
Parameter Sets:UncNetworkPath, LocalFolderOnSiteServer
Required:True
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
Required:False
Position:Named
Default value:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
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 to identify a package. For example, you can have an English version and a German version of the same package.

Type:String
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Aliases:PackageSourcePath
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Version

Specifies a version number for the package.

Type:String
Required:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False