New-Adfs Ldap Server Connection

Creates a connection object.

Syntax

New-AdfsLdapServerConnection
   [-HostName] <String>
   [-Port <Int32>]
   [-SslMode <LdapSslMode>]
   [-AuthenticationMethod <LdapAuthenticationMethod>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The New-AdfsLdapServerConnection cmdlet creates a connection object that represents the Lightweight Directory Access Protocol (LDAP) folder that serves as a claims provider trust. A connection object includes host name, port, and authentication credentials.

Examples

Example 1: Create an LDAP connection

PS C:\> $Credential = Get-Credential
PS C:\ > $LdapConn = New-AdfsLdapServerConnection -HostName "DomainContoller03.contoso.com" -Port 389 -SslMode None -AuthenticationMethod Basic -Credential $Credential

The first command prompts you for a user name and password by using the Get-Credential cmdlet. The command stores the results in the $Credential variable.

The second command creates an LDAP connection. DomainContoller03.contoso.com is the fully qualified domain name of a domain controller in the other forest. The command stores the result in the $LdapConn variable.

To see this cmdlet as part of creating an LDAP local claims provider trust, see the Add-AdfsLocalClaimsProviderTrust cmdlet.

Required Parameters

-HostName

Specifies the fully qualified domain name of the server that hosts the LDAP folder to which Active Directory Federation Services (AD FS) connects for authentication requests.

Type: String
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Optional Parameters

-AuthenticationMethod

Specifies the authentication method the local claims provider trust uses. In Windows Server 2016, the only supported method is Basic (username/password).

Type: LdapAuthenticationMethod
Parameter Sets: Basic, Kerberos, Negotiate
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Credential

Specifies the credentials to use for the connection to the LDAP host. To obtain a PSCredential object, use the Get-Credential cmdlet.

Type: PSCredential
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Port

Specifies the port that AD FS uses to connect to the LDAP host.

Type: Int32
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SslMode

Specifies SSL setting of the connection. The acceptable values for this parameter are:

  • None
  • Ssl
  • Tls
Type: LdapSslMode
Parameter Sets: None, Ssl, Tls
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False