Configuration driven Active Directory management.
Returns a principal’s resolved AD object if able to.
Get-AdcPrincipal -Sid <String> -Domain <String> [-OutputType <String>] [-Refresh] [-Target <String>]
[-Server <ComputerParameter>] [-Credential <PSCredential>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get-AdcPrincipal -Name <String> -ObjectClass <String> -Domain <String> [-OutputType <String>] [-Refresh]
[-Target <String>] [-Server <ComputerParameter>] [-Credential <PSCredential>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
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.
Get-AdcPrincipal -Sid $adObject.ObjectSID -Domain $redForestDomainFQDN
Tries to return the principal from the specified domain based on the SID offered.
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
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
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
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
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
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
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
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
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
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.