Compartilhar via


Add-CMUserCollectionToAdministrativeUser

Add-CMUserCollectionToAdministrativeUser

Adds a user collection to an administrative user in Configuration Manager.

Syntax

Parameter Set: AddUserCollectionToAdminByName_Name
Add-CMUserCollectionToAdministrativeUser -AdministrativeUserName <String> -UserCollectionName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminById_Id
Add-CMUserCollectionToAdministrativeUser -AdministrativeUserId <Int32> -UserCollectionId <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminById_Name
Add-CMUserCollectionToAdministrativeUser -AdministrativeUserName <String> -UserCollectionId <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminById_Object
Add-CMUserCollectionToAdministrativeUser -AdministrativeUser <IResultObject> -UserCollectionId <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminByName_Id
Add-CMUserCollectionToAdministrativeUser -AdministrativeUserId <Int32> -UserCollectionName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminByName_Object
Add-CMUserCollectionToAdministrativeUser -AdministrativeUser <IResultObject> -UserCollectionName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminByObject_Id
Add-CMUserCollectionToAdministrativeUser -AdministrativeUserId <Int32> -UserCollection <IResultObject> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminByObject_Name
Add-CMUserCollectionToAdministrativeUser -AdministrativeUserName <String> -UserCollection <IResultObject> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserCollectionToAdminByObject_Object
Add-CMUserCollectionToAdministrativeUser -AdministrativeUser <IResultObject> -UserCollection <IResultObject> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Add-CMUserCollectionToAdministrativeUser cmdlet adds a user collection to an administrative user. In Microsoft System Center 2012 Configuration Manager, collections represent logical groupings of users or devices. You use collections to perform tasks such as managing settings or installing software updates.

Parameters

-AdministrativeUser<IResultObject>

Specifies a CMUserCollection 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

-AdministrativeUserId<Int32>

Specifies a unique ID of an administrative group or user.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AdministrativeUserName<String>

Specifies a name of an administrative group or user.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserCollection<IResultObject>

Specifies a CMUserCollection 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

-UserCollectionId<String>

Specifies a unique ID of a user collection associated with an administrative user.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserCollectionName<String>

Specifies a name of a user collection associated with an administrative user.

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: Add a collection to an administrative user

This command adds a user collection to an administrative user.

PS C:\> Add-CMUserCollectionToAdministrativeUser -UserCollectionName coll01 -AdministrativeUserName "Western\sarahjones"

Remove-CMUserCollectionFromAdministrativeUser