Set-MceGroup
SYNOPSIS
Updates the properties of an MCE group.
SYNTAX
Set-MceGroup [-Id] <String> [[-DisplayName] <String>] [[-IsEnabled] <Boolean>] [[-Privacy] <String>]
[[-Description] <String>] [[-Members] <PSListModifier>] [[-Managers] <PSListModifier>] [<CommonParameters>]
DESCRIPTION
This cmdlet updates individual properties of an MCE group.
The cmdlet is designed to support pipelining from Get-MceGroup.
EXAMPLES
EXAMPLE 1
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -DisplayName "New display name" -Description "New description"
Updates the display name and description for a group.
EXAMPLE 2
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -Description $null
Clears the description for a group.
EXAMPLE 3
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -IsEnabled $true
Enables a group.
EXAMPLE 4
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -GroupPrivacy "Secret" -IsEnabled $true
Enables a group and updates its privacy to Secret.
EXAMPLE 5
Get-MceGroup | Set-MceGroup -GroupPrivacy "Open"
Sets all MCE groups' privacy to Open.
EXAMPLE 6
$AddedManager = [pscustomobject]@{Issuer="AD"; Name="cois"; Value="COI1"}
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -Managers @{Add=@(AddedManager)}
Adds managers belonging to COI1 to a group.
EXAMPLE 7
$RemovedManager = @{Issuer="AD"; Name="cois"; Value="COI2"}
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -Managers @{Remove=@($RemovedManager)}
Removes the COI2 attribute from a group's managers collection.
EXAMPLE 8
$Guid = Get-AdGroup -Filter 'Name -Like "Engineers"'
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -Members @{Replace=@(@{Issuer="AD";Name="http://schemas.mindlinksoft.com/identity/claims/group";Value="${Guid}"})}
Replaces all the members of a group with the Engineers AD group.
EXAMPLE 9
Set-MceGroup -Id "4f55b2be-1c07-4fcb-8c66-db563fd46300" -Members @{Remove=@("a979befc-34fa-4ffd-9b67-1245a9df3166")} -Managers @{Remove=@("a979befc-34fa-4ffd-9b67-1245a9df3166")}
Removes a user from the group's members and the group's managers.
PARAMETERS
-Id
The group ID.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-DisplayName
The group display name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IsEnabled
The enabled state.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Privacy
The group privacy.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
The group description, or null
to clear the description.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Members
The group members.
Type: PSListModifier
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Managers
The group managers.
Type: PSListModifier
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.String
The group ID.
System.Management.Automation.PSListModifier
The group members.
System.Management.Automation.PSListModifier
The group managers.