Export-CMUserCollection

Export-CMUserCollection

Exports a user collection in Configuration Manager.

Syntax

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

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

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




Detailed Description

The Export-CMUserCollection cmdlet exports a user collection in Microsoft System Center 2012 Configuration Manager. To export a collection, you must have Read rights on the collection.

Parameters

-CollectionId<String>

Specifies an ID of a collection in Configuration Manager.


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 export file.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ExportFilePath<String>

Specifies a file 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 an input object. To obtain a user collection object, use the Get-CMUserCollection cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies a name for the export file.


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 (http://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 user collection

This command exports a user collection by using an export file path and a name.


PS C:\> Export-CMUserCollection -ExportFilePath "C:\Exports" -Name "All Western Users"

Example 2: Export a user collection by collection ID

This command exports a user collection by using a collection ID and an export file path.


PS C:\> Export-CMUserCollection -CollectionId "CM4" -ExportFilePath "C:\Exports"

Example 3: Export a user collection from an input object

This example exports a user collection by using an export file path and an input object.

The first command obtains an input object.

The second command exports the user collection using the input object named IRObj-013.


PS C:\> $IRObj-013 = Get-CMUserCollectionPS C:\> Export-CMUserCollection -ExportFilePath "D:\Exported Collections" -InputObject IRObj-013

Related topics

Community Additions

ADD
Show: