New-CMPackage
New-CMPackage
Creates a Configuration Manager package.
Syntax
Parameter Set: New
New-CMPackage -Name <String> [-Description <String> ] [-Language <String> ] [-Manufacturer <String> ] [-Path <String> ] [-Version <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewPackageByDefinitionNoSourceFileWithExisted
New-CMPackage -FromDefinition -PackageDefinitionName <String> -PackageNoSourceFile [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewPackageByDefinitionNoSourceFileWithNew
New-CMPackage -FromDefinition -PackageNoSourceFile -PackagePath <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewPackageByDefinitionSourceFileWithExisted
New-CMPackage -FromDefinition -PackageDefinitionName <String> -SourceFileType <SourceFileType> {AlwaysObtainSourceFile | CreateCompressedVersionOfSourceFile} -SourceFolderPath <String> -SourceFolderPathType <SourceFolderPathType> {LocalFolderOnSiteServer | UncNetworkPath} [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewPackageByDefinitionSourceFileWithNew
New-CMPackage -FromDefinition -PackagePath <String> -SourceFileType <SourceFileType> {AlwaysObtainSourceFile | CreateCompressedVersionOfSourceFile} -SourceFolderPath <String> -SourceFolderPathType <SourceFolderPathType> {LocalFolderOnSiteServer | UncNetworkPath} [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The New-CMPackage cmdlet creates a Microsoft System Center 2012 Configuration Manager package. A package is a System Center 2012 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 2012 Configuration Manager clients.
Parameters
-Description<String>
Specifies a description for the package. You can use a maximum of 128 characters.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-FromDefinition
Indicates that Configuration Manager creates the package from a package definition file.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Language<String>
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 property 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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Manufacturer<String>
Specifies a manufacturer name to help you identify the package. You can use a maximum of 32 characters.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies a name for the package.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PackageDefinitionName<String>
Specifies the name of a package definition file.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PackageNoSourceFile
Indicates that the package does not require source files to be present on client devices.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-PackagePath<String>
Specifies a share name or path that Configuration Manager creates for the package source files on distribution points.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Path<String>
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.
Aliases |
PackageSourcePath |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SourceFileType<SourceFileType>
Specifies the source file type. The acceptable values for this parameter are:
-- AlwaysObtainSourceFile
-- CreateCompressedVersionOfSourceFile
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SourceFolderPath<String>
Specifies the location of the source files for the package.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SourceFolderPathType<SourceFolderPathType>
Specifies the source folder path type. The acceptable values for this parameter are:
-- LocalFolderOnSiteServer
-- UncNetworkPath
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Version<String>
Specifies a version number for the package.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Create a package
This command creates a Configuration Manager package named ScriptsPackage01.
PS C:\> New-CMPackage -Name "ScriptsPackage01"
Example 2: Create a package and add a description
This command creates a Configuration Manager package named ScriptsPackage02 and adds the specified description to the package.
PS C:\> New-CMPackage -Name "ScriptsPackage02" -Description "This package deploys scripts that run on a recurring schedule."