Active Directory Management Framework

Configuration driven Active Directory management.

Convert-AdcPrincipal

SYNOPSIS

Converts a principal to either SID or NTAccount format.

SYNTAX

Convert-AdcPrincipal [-Name] <String> [[-OutputType] <String>] [[-Server] <ComputerParameter>]
 [[-Credential] <PSCredential>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Converts a principal to either SID or NTAccount format. It caches all resolutions, uses Convert-BuiltInToSID to resolve default builtin account names, uses Get-Domain to resolve foreign domain SIDs and names.

Basically, it is a best effort attempt to resolve principals in a useful manner.

EXAMPLES

EXAMPLE 1

Convert-AdcPrincipal @parameters -Name contoso\administrator

Tries to convert the user contoso\administrator into a SID

PARAMETERS

-Name

The name of the entity to convert.

Type: String
Parameter Sets: (All)
Aliases:

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

-OutputType

Whether to return an NTAccount or SID. Defaults to SID

Type: String
Parameter Sets: (All)
Aliases:

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

-Server

The server / domain to work with.

Type: ComputerParameter
Parameter Sets: (All)
Aliases:

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