Export-CMDeviceCollection

Export-CMDeviceCollection

Exports a device collection.

Syntax

Parameter Set: SearchByNameMandatory
Export-CMDeviceCollection -ExportFilePath <String> -Name <String> [-ExportComment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Export-CMDeviceCollection -CollectionId <String> -ExportFilePath <String> [-ExportComment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Export-CMDeviceCollection -ExportFilePath <String> -InputObject <IResultObject> [-ExportComment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Export-CMDeviceCollection cmdlet exports a device collection. This cmdlet exports a device collection from the site database to a Managed Object Format (MOF) file that you can archive or use at another Microsoft System Center 2012 SP1 Configuration Manager site.

Parameters

-CollectionId<String>

Specifies the ID of a device collection.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ExportComment<String>

Specifies a comment for the exported device collection.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ExportFilePath<String>

Specifies the full path for the export file.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies a device collection object. To obtain a CMDeviceCollection object, use the Get-CMDeviceCollection cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a device collection.

Aliases

none

Required?

true

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: Export a device collection

This command exports the device collection named Windows 7 to the MOF file named Win7Devices.

PS C:\> Export-CMDeviceCollection -ExportFilePath "\\Contoso01\Export\Win7Devices" -Name "Windows 7"

Get-CMDeviceCollection

Import-CMDeviceCollection

New-CMDeviceCollection

Remove-CMDeviceCollection

Set-CMDeviceCollection