Active Directory Management Framework

Configuration driven Active Directory management.

Get-AdcPrincipal

SYNOPSIS

Returns a principal’s resolved AD object if able to.

SYNTAX

SID

Get-AdcPrincipal -Sid <String> -Domain <String> [-OutputType <String>] [-Refresh] [-Target <String>]
 [-Server <ComputerParameter>] [-Credential <PSCredential>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

Name

Get-AdcPrincipal -Name <String> -ObjectClass <String> -Domain <String> [-OutputType <String>] [-Refresh]
 [-Target <String>] [-Server <ComputerParameter>] [-Credential <PSCredential>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Returns a principal’s resolved AD object if able to. Will throw an exception if the AD connection fails. Will return nothing if the target domain does not contain the specified principal. Uses the credentials provided by Set-AdcDomainCredential if available.

Results will be cached automatically, subsequent callls returning the cached results.

EXAMPLES

EXAMPLE 1

Get-AdcPrincipal -Sid $adObject.ObjectSID -Domain $redForestDomainFQDN

Tries to return the principal from the specified domain based on the SID offered.

PARAMETERS

-Sid

The SID of the principal to search.

Type: String
Parameter Sets: SID
Aliases:

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

-Name

The name of the principal to search for.

Type: String
Parameter Sets: Name
Aliases:

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

-ObjectClass

The objectClass of the principal to search for.

Type: String
Parameter Sets: Name
Aliases:

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

-Domain

The domain in which to look for the principal.

Type: String
Parameter Sets: (All)
Aliases:

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

-OutputType

The format in which the output is being returned.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: ADObject
Accept pipeline input: False
Accept wildcard characters: False

-Refresh

Do not use cached data, reload fresh data.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Target

The target AD object this access rule applies to. Used for logging only.

Type: String
Parameter Sets: (All)
Aliases:

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

-Server

The server / domain to work with.

Type: ComputerParameter
Parameter Sets: (All)
Aliases:

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

-Credential

The credentials to use for this operation.

Type: PSCredential
Parameter Sets: (All)
Aliases:

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

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
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

OUTPUTS

NOTES