Connect-LDAPCmdlet
Parameters Output Objects Config Settings
The Connect-LDAP cmdlet is used to create a persistent connection object.
Syntax
$cnn = Connect-LDAP [parameters]
Remarks
This cmdlet allows you to create a persistent connection object to be used with related cmdlets.When executing the cmdlet a connection object is returned. Pass this object to the Connection parameter of related cmdlets to use the newly created connection object.
To disconnect call Disconnect-LDAP.
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
LogFile | The location of a file to which debug information is written. |
BindDN | The Distinguished Name used as the base for the LDAP bind. |
CertPassword | The password to the certificate store. |
CertStore | The name of the certificate store for the client certificate. |
CertStoreType | The type of certificate store for the client certificate. |
CertSubject | The subject of the certificate used for client authentication. |
Config | Specifies one or more configuration settings. |
Credential | The PSCredential object to use for user/password authentication. |
FirewallHost | Name or IP address of firewall. |
FirewallPassword | A password if authentication is to be used when connecting through the firewall. |
FirewallPort | The port of the firewall to which to connect. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
Force | Forces the component to accept the default behavior instead of querying the user. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
Password | The password to use for authentication. |
Port | The TCP port in the remote host to which to connect. |
Server | The address of the Server. |
SSL | Determines how the component starts SSL negotiation. |
SSLAccept | The encoded public key of the certificate which is to be trusted explicitly. |
Timeout | The maximum time allowed for the operation. |
Version | The version of LDAP used. |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
LDAPConnection | The connection object. |
Config Settings
The following is a list of config settings for the cmdlet with short descriptions. Click on the links for further details.
DomainController | Returns the name of the domain controller. |
FriendlyGUID | Whether to return GUID attribute values in a human readable format. |
FriendlySID | Whether to return SID attribute values in a human readable format. |
RequestControls | Controls to include in the request. |
ResponseControls | Controls present in the response. |
SingleResultMode | Determines how ResultDN behaves. |
UseDefaultDC | Whether to connect to the default Domain Controller when calling Bind. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
MaskSensitive | Whether sensitive data is masked in log messages. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |
LogFile Parameter (Connect-LDAP Cmdlet)
The location of a file to which debug information is written.
Syntax
Connect-LDAP -LogFile string
Remarks
When specified, the cmdlet will log debug information to the file. If the file exists, the information will be appended.Default Value
null
Attributes Parameter (Connect-LDAP Cmdlet)
Attribute values for the current entry.
Syntax
Connect-LDAP -Attributes Hashtable
Remarks
Default Value
null
BindDN Parameter (Connect-LDAP Cmdlet)
The Distinguished Name used as the base for the LDAP bind.
Syntax
Connect-LDAP -BindDN string
Remarks
Default Value
""
Parameter Position
1
CertPassword Parameter (Connect-LDAP Cmdlet)
The password to the certificate store.
Syntax
Connect-LDAP -CertPassword string
Remarks
Default Value
""
Parameter Alias
CertificatePassword
CertStore Parameter (Connect-LDAP Cmdlet)
The name of the certificate store for the client certificate.
Syntax
Connect-LDAP -CertStore string
Remarks
Default Value
"MY"
Parameter Alias
CertificateStore
CertStoreType Parameter (Connect-LDAP Cmdlet)
The type of certificate store for the client certificate.
Syntax
Connect-LDAP -CertStoreType string
Remarks
Default Value
0
CertSubject Parameter (Connect-LDAP Cmdlet)
The subject of the certificate used for client authentication.
Syntax
Connect-LDAP -CertSubject string
Remarks
Default Value
"*"
Config Parameter (Connect-LDAP Cmdlet)
Specifies one or more configuration settings.
Syntax
Connect-LDAP -Config string[]
Remarks
Default Value
null
Credential Parameter (Connect-LDAP Cmdlet)
The PSCredential object to use for user/password authentication.
Syntax
Connect-LDAP -Credential PSCredential
Remarks
Default Value
null
Parameter Position
1
Parameter Alias
auth
DN Parameter (Connect-LDAP Cmdlet)
The DN on which to operate.
Syntax
Connect-LDAP -DN string
Remarks
Default Value
""
This is a required parameter.
FirewallHost Parameter (Connect-LDAP Cmdlet)
Name or IP address of firewall.
Syntax
Connect-LDAP -FirewallHost string
Remarks
Default Value
""
FirewallPassword Parameter (Connect-LDAP Cmdlet)
A password if authentication is to be used when connecting through the firewall.
Syntax
Connect-LDAP -FirewallPassword string
Remarks
Default Value
""
FirewallPort Parameter (Connect-LDAP Cmdlet)
The port of the firewall to which to connect.
Syntax
Connect-LDAP -FirewallPort int
Remarks
Default Value
0
FirewallType Parameter (Connect-LDAP Cmdlet)
Determines the type of firewall to connect through.
Syntax
Connect-LDAP -FirewallType string
Remarks
Default Value
0
FirewallUser Parameter (Connect-LDAP Cmdlet)
A user name if authentication is to be used connecting through a firewall.
Syntax
Connect-LDAP -FirewallUser string
Remarks
Default Value
""
Force Parameter (Connect-LDAP Cmdlet)
Forces the component to accept the default behavior instead of querying the user.
Syntax
Connect-LDAP -Force SwitchParameter
Remarks
Default Value
false
LocalIP Parameter (Connect-LDAP Cmdlet)
The IP address of the local interface to use.
Syntax
Connect-LDAP -LocalIP string
Remarks
Default Value
""
Parameter Alias
LocalAddress
LogFile Parameter (Connect-LDAP Cmdlet)
The location of a file to which debug information is written.
Syntax
Connect-LDAP -LogFile string
Remarks
Default Value
""
Password Parameter (Connect-LDAP Cmdlet)
The password to use for authentication.
Syntax
Connect-LDAP -Password string
Remarks
Default Value
""
Port Parameter (Connect-LDAP Cmdlet)
The TCP port in the remote host to which to connect.
Syntax
Connect-LDAP -Port int
Remarks
Default Value
389
Server Parameter (Connect-LDAP Cmdlet)
The address of the Server.
Syntax
Connect-LDAP -Server string
Remarks
Default Value
""
Parameter Position
0
Parameter Alias
directory
This is a required parameter.
SSL Parameter (Connect-LDAP Cmdlet)
Determines how the component starts SSL negotiation.
Syntax
Connect-LDAP -SSL string
Remarks
Default Value
3
SSLAccept Parameter (Connect-LDAP Cmdlet)
The encoded public key of the certificate which is to be trusted explicitly.
Syntax
Connect-LDAP -SSLAccept string
Remarks
Default Value
""
Parameter Alias
Accept
Timeout Parameter (Connect-LDAP Cmdlet)
The maximum time allowed for the operation.
Syntax
Connect-LDAP -Timeout int
Remarks
Default Value
10
Version Parameter (Connect-LDAP Cmdlet)
The version of LDAP used.
Syntax
Connect-LDAP -Version int
Remarks
Default Value
2
LDAPConnection Output Object (Connect-LDAP Cmdlet)
The connection object.
Syntax
Object LDAPConnection {string BindDN;
string CertPassword;
string CertStore;
string CertStoreType;
string CertSubject;
string[] Config;
PSCredential Credential;
string FirewallHost;
string FirewallPassword;
int FirewallPort;
string FirewallType;
string FirewallUser;
SwitchParameter Force;
string LocalIP;
string LogFile;
string Password;
int Port;
string Server;
string SSL;
string SSLAccept;
int Timeout;
int Version;
}