The Get-CMUserCollectionExcludeMembershipRule cmdlet retrieves the rules that exclude the members of another collection from the user collections where the rule is applied.
You can specify the user collections where the rule is applied by using their names, IDs, or by specifying an object that represents the collections.
You can specify the collection whose members are excluded by using its name, ID, or an object that represents the collection.
Microsoft System Center Configuration Manager dynamically updates the membership of the user collection on a schedule if the membership of the excluded collection changes.
For more information about membership rules, see Introduction to Collections in Configuration Manager on TechNet.
Example 1: Get the exclude membership rule from a user collection