Export-CMDriverPackage

Export a driver package.

Syntax

Export-CMDriverPackage
      [-Comment <String>]
      -ExportFilePath <String>
      [-Force]
      -Name <String>
      [-WithContent <Boolean>]
      [-WithDependence <Boolean>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Export-CMDriverPackage
      [-Comment <String>]
      -ExportFilePath <String>
      [-Force]
      -InputObject <IResultObject>
      [-WithContent <Boolean>]
      [-WithDependence <Boolean>]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Export-CMDriverPackage
      [-Comment <String>]
      -ExportFilePath <String>
      [-Force]
      -Id <String>
      [-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.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ExportFilePath

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

Type:String
Aliases:FileName, FilePath, Path
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Force

Run the command without asking for confirmation.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-Id

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

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

-InputObject

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

Type:IResultObject
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specify the name of a driver package to export.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WithContent

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

Type:Boolean
Aliases:ExportAllContent
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WithDependence

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

Type:Boolean
Aliases:ExportAssociateDrivers
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object