New-CMUserCollection
Updated: March 1, 2013
Applies To: System Center 2012 Configuration Manager SP1
New-CMUserCollection
Syntax
Parameter Set: NewByLimitName New-CMUserCollection -LimitingCollectionName <String> -Name <String> [-Comment <String> ] [-RefreshType <RefreshTypes> ] [-Confirm] [-WhatIf] [ <CommonParameters>] Parameter Set: NewByLimitId New-CMUserCollection -LimitingCollectionId <String> -Name <String> [-Comment <String> ] [-RefreshSchedule <IResultObject[]> ] [-RefreshType <RefreshTypes> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The New-CMUserCollection cmdlet creates a collection based on a specific limiting collection. The limiting collection determines which users can be a member of the user collection that you create. For example, when you use the All Users collection as the limiting collection, the new collection can include any user in the Configuration Manager hierarchy. You specify the limiting collection by providing its name or Id.
Users are added to the collection by membership rules. To add members to the user collection use one of the following membership rule cmdlets:
Add-CMUserCollectionDirectMembershipRule
Add-CMUserCollectionExcludeMembershipRule
Add-CMUserCollectionIncludeMembershipRule
Add-CMDeviceCollectionQueryMembershipRule
Collections represent logical groupings of resources, such as users and devices. For more information about Configuration Manager collections, see Introduction to Collections in Configuration Manager.
Parameters
-Comment<String>
Specifies a description of the collection, such as the users in a specific organization.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-LimitingCollectionId<String>
Specifies the Id of the limiting collection that Configuration Manager uses to limit which users are available to the user collection that you are creating. For example, the following Id is the Id of the All Users collection: SMS00002.
Aliases | LimitToCollectionId |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-LimitingCollectionName<String>
Specifies the name of the limiting collection that Configuration Manager uses to limit which users are available to the user collection that you are creating. For example, you can specify the All Users collection.
Aliases | LimitToCollectionName |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Name<String>
Specifies the name for the user collection that you want to create.
Aliases | none |
Required? | true |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-RefreshSchedule<IResultObject[]>
Specifies a schedule that determines when Configuration Manager refreshes the collection.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-RefreshType<RefreshTypes>
Specifies how Configuration Manager refreshes the collection. Valid values are:
-- MANUAL: The collection is refreshed using the Configuration Manager console or the Configuration Manager SDK.
-- PERIODIC: The collection is refreshed based on the schedule specified by the RefreshSchedule parameter.
-- CONSTANT_UPDATE: The collection is refreshed whenever a member is added to the collection.
Aliases | none |
Required? | false |
Position? | named |
Default Value | none |
Accept Pipeline Input? | True (ByPropertyName) |
Accept Wildcard Characters? | false |
-Confirm
Prompts you for confirmation before executing the command.
Required? | false |
Position? | named |
Default Value | false |
Accept Pipeline Input? | false |
Accept Wildcard Characters? | false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
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.
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
This example creates a collection for all users in the Sales department. It uses the All Users collection as its limiting collection.
PS C:\> New-CMUserCollection –Name “Sales” –LimitingCollectionName “All Users”
