Skip to content

Test-ADUserExists

SYNOPSIS

Checks if an Active Directory user exists based on specific attributes.

SYNTAX

Test-ADUserExists [[-RijksRegisterNummerHash] <String>] [[-MasterDataGuid] <String>] [<CommonParameters>]

DESCRIPTION

The `Test-ADUserExists` function checks if an Active Directory user exists by searching for specific attributes such as `RijksRegisterNummerHash` or `MasterDataGuid`. It retrieves the most recent matching user object and provides details such as `DistinguishedName`, `Enabled` status, and suggested actions.

EXAMPLES

EXAMPLE 1

Test-ADUserExists -RijksRegisterNummerHash "hashedvalue123"

Checks if a user exists with the specified Rijksregister number hash.

EXAMPLE 2

Test-ADUserExists -MasterDataGuid "guid-value-12345"

Checks if a user exists with the specified Master Data GUID.

EXAMPLE 3

Test-ADUserExists -RijksRegisterNummerHash "hashedvalue123" -MasterDataGuid "guid-value-12345"

Checks if a user exists with either the specified Rijksregister number hash or Master Data GUID.

PARAMETERS

-RijksRegisterNummerHash

The hashed Rijksregister number used to identify the user.

Type: String
Parameter Sets: (All)
Aliases: RRNHash

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MasterDataGuid

The Master Data GUID used to identify the user.

Type: String
Parameter Sets: (All)
Aliases: MasterGUID, MDMGUID

Required: False
Position: 2
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

OUTPUTS

NOTES