編集

次の方法で共有


New-AdfsLdapServerConnection

Creates a connection object.

Syntax

Default (Default)

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.

Parameters

-AuthenticationMethod

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

Parameter properties

Type:LdapAuthenticationMethod
Default value:None
Accepted values:Basic, Kerberos, Negotiate
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

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

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Port

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SslMode

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

  • None
  • Ssl
  • Tls

Parameter properties

Type:LdapSslMode
Default value:None
Accepted values:None, Ssl, Tls
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.