Skip to main content

Set-MceUser

SYNOPSIS

Updates the properties of an MCE user.

SYNTAX

Set-MceUser [-Id] <String> [[-DisplayName] <String>] [[-Status] <UserStatus>]
[[-LinkedUserIdentities] <PSListModifier>] [<CommonParameters>]

DESCRIPTION

This cmdlet updates individual properties of a user.

The cmdlet is designed to support pipelining from Get-MceUser.

EXAMPLES

EXAMPLE 1

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -DisplayName "James Smith"

Updates the display name for a user.

EXAMPLE 2

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -DisplayName $null

Clears the display name for a user.

EXAMPLE 3

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -Status Disabled

Disables a user.

NOTE: Once a user is set to 'Removed', they cannot be set to other states; e.g. Attempting to set a 'Removed' user to 'Enabled' will result in an error.

EXAMPLE 4

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -Status Suspended

Suspends a user.

EXAMPLE 5

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -DisplayName "James Smith" -IsEnabled $true

Enables a user and updates their display name.

EXAMPLE 6

Get-MceUser | Set-MceUser -Status Removed

Removes all users.

EXAMPLE 7

$LinkedIdentity = [pscustomobject]@{IdentityProviderId="AD"; Name="objectGuid"; Value="88424234-8752-41fb-b8c7-8c8048ea061a"}

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -LinkedUserIdentities @{Add=@($LinkedIdentity)}

Adds a linked user identity to a user.

EXAMPLE 8

$LinkedIdentity = [pscustomobject]@{IdentityProviderId="AD"; Name="objectGuid"; Value="88424234-8752-41fb-b8c7-8c8048ea061a"}

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -LinkedUserIdentities @{Remove=@($LinkedIdentity)}

Removes a linked user identity from a user.

EXAMPLE 9

$AddLinkedIdentity = [pscustomobject]@{IdentityProviderId="AD"; Name="objectGuid"; Value="88424234-8752-41fb-b8c7-8c8048ea061a"}

$RemoveLinkedIdentity = [pscustomobject]@{IdentityProviderId="OP"; Name="otherAttribute"; Value="33a16fea-6124-4b5b-9378-5f959f60ffb8"}

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -LinkedUserIdentities @{Add=@($AddLinkedIdentity), Remove=@($RemoveLinkedIdentity)}

Removes a linked user identity from a user.

EXAMPLE 10

$LinkedIdentity = [pscustomobject]@{IdentityProviderId="AD"; Name="objectGuid"; Value="88424234-8752-41fb-b8c7-8c8048ea061a"}

Set-MceUser -Id "4f55b2be-1c07-4fcb-8c66-db563fd46206" -LinkedUserIdentities @{Replace=@($LinkedIdentity)}

Replaces the linked user identities for a user.

PARAMETERS

-Id

The user 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 user display name or null or to clear the display name. Note that this has no effect on display names synchronized from external identity providers.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status

The user status.

Possible values: Disabled, Enabled, Suspended, Removed

Type: UserStatus
Parameter Sets: (All)
Aliases:
Accepted values: Disabled, Enabled, Suspended, Removed

Required: False
Position: 2
Default value: Disabled
Accept pipeline input: False
Accept wildcard characters: False

-LinkedUserIdentities

The linked user identities.

Type: PSListModifier
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
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 user ID.

System.Management.Automation.PSListModifier

The linked user identities.

OUTPUTS

None

NOTES

MindLink Docs