Get-MceUser
SYNOPSIS
Gets the specified MCE user.
SYNTAX
GetUserById (Default)
Get-MceUser [[-Id] <String>] [[-MatchExact] <Boolean>] [[-Status] <UserStatus>] [-IncludeRemovedUsers]
[<CommonParameters>]
SearchUsers
Get-MceUser [[-SearchTerm] <String>] [[-MatchExact] <Boolean>] [[-Status] <UserStatus>] [-IncludeRemovedUsers]
[<CommonParameters>]
DESCRIPTION
This cmdlet gets the MCE user by either an ID or by search term.
The cmdlet is designed to pipeline returned user IDs to other cmdlets.
EXAMPLES
EXAMPLE 1
Get-MceUser -SearchTerm john
Gets MCE users which match the name john.
EXAMPLE 2
Get-MceUser -SearchTerm john -Status Enabled
Gets MCE users which match the name john and are enabled.
EXAMPLE 3
Get-MceUser -Status Removed
Gets MCE users in the specified state. (Note: Removed users cannot be re-enabled in the system).
EXAMPLE 4
Get-MceUser -SearchTerm john -MatchExact
Gets MCE user which name exactly matching the name john.
EXAMPLE 5
GetMceUser -IncludeRemovedUsers
Gets all of the MCE users, and includes 'removed' users in the results.
EXAMPLE 6
Get-MceUser
Gets all of the MCE users, 'removed' users are not included.
EXAMPLE 7
Get-MceUser -Id 01234567-89ab-cdef-1234-56789abcdef0
Gets the MCE User with the exact ID "01234567-89ab-cdef-1234-56789abcdef0".
EXAMPLE 8
Get-MceUser | Group -property {$PSItem.linkedUserIdentities.value} | ? {$PSItem.count -ge 2} | Select -property {$PSItem.Group}
Set-MceUser -Id duplicateUserGuid -IsEnabled $False
Gets table of all GUIDs for duplicate MCE users.
PARAMETERS
-SearchTerm
The search term.
Type: String
Parameter Sets: SearchUsers
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Id
The ID.
This value is optional, since the ID may be synchronized from external identity provider. Additionally, if synchronized from an external provider, the ID value provided here will be overridden.
Type: String
Parameter Sets: GetUserById
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-MatchExact
The flag used to determine whether a search term is to be used as an exact match.
This value is optional; running without this flag will return user(s) with a display name that has a partial match to the SearchTerm.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Status
The user's 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: None
Accept pipeline input: False
Accept wildcard characters: False
-IncludeRemovedUsers
Optional flag, which when specified will include removed users in the results.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: False
Accept pipeline input: False
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 search term.
System.String
The ID.
This value is optional, since the ID may be synchronized from external identity provider. Additionally, if synchronized from an external provider, the ID value provided here will be overridden.