Edit

Share via


Export-CMDriverPackage

Export a driver package.

Syntax

SearchPackageByNameMandatory (Default)

Export-CMDriverPackage
    -ExportFilePath <String>
    -Name <String>
    [-Comment <String>]
    [-Force]
    [-WithContent <Boolean>]
    [-WithDependence <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByValueMandatory

Export-CMDriverPackage
    -ExportFilePath <String>
    -InputObject <IResultObject>
    [-Comment <String>]
    [-Force]
    [-WithContent <Boolean>]
    [-WithDependence <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchPackageByIdMandatory

Export-CMDriverPackage
    -ExportFilePath <String>
    -Id <String>
    [-Comment <String>]
    [-Force]
    [-WithContent <Boolean>]
    [-WithDependence <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use this cmdlet to export driver packages. You can use the Import-CMDriverPackage cmdlet to import a driver package to the site.

Important

This cmdlet doesn't support PowerShell 7. It requires the .NET Framework instead of .NET Core that's used with PowerShell version 7.

Starting in version 2103, if you try to use this cmdlet in a PowerShell version 7 session, it fails with the following error: This cmdlet only supports the ".NET Framework" runtime.

Note

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

Examples

Example 1: Export a driver package

This command exports the driver package named DrvPkg01 to the export file DriverPackage01.zip.

Export-CMDriverPackage -Name "DrvPkg01" -ExportFilePath "\\Contoso02\DriverPackages\DriverPackage01.zip"

Parameters

-Comment

Specify an optional administrator comment. This comment displays in the Import Driver Package Wizard.

Parameter properties

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

Parameter sets

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

-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

-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

-ExportFilePath

Specify the network path for the driver package. The path needs to specify the file, including the .zip extension.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:FileName, FilePath, Path

Parameter sets

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

-Force

Run the command without asking for confirmation.

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

-Id

Specify the driver package ID to export. This value is the standard package ID, for example XYZ00123.

Parameter properties

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

Parameter sets

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

-InputObject

Specify a driver package object to export. To get this object, use the Get-CMDriverPackage cmdlet.

Parameter properties

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

Parameter sets

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

-Name

Specify the name of a driver package to export.

Parameter properties

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

Parameter sets

SearchPackageByNameMandatory
Position:Named
Mandatory:True
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

-WithContent

Set this parameter to $true to export all content for the driver package and drivers.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ExportAllContent

Parameter sets

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

-WithDependence

Set this parameter to $true to export all associated drivers.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ExportAssociateDrivers

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

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object