NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Get-LDAP Configuration

The cmdlet accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the cmdlet, access to these internal properties is provided through the Config method.

GetLDAP Configuration Settings

OutputBinary:   Controls whether the cmdlet returns raw binary data as a byte array or not.

When this configuration option is true the Get-LDAP cmdlet will return the raw binary representation of LDAP Attributes in byte arrays. These byte arrays will be the Attribute name with the character "B" suffix. For example, the raw byte array for the "objectGUID" attribute can be retrieved via "objectGUIDB" as demonstrated below:

PS> $obj = Get-LDAP -Server $server -BindDN $bind -Password $passwd -DN $dn -Search $searchString
PS> $guidArray = $obj.objectGUIDB

LDAP Configuration Settings

FriendlyGUID:   Whether to return GUID attribute values in a human readable format.

When inspecting object attributes this setting determines whether GUID attributes such as "objectGUID" are returned as binary objects or converted into a human readable string such as "708d9374-d64a-49b2-97ea-489ddc717703". When set to True a friendly string value is returned. When set to False (default) a binary object is returned.

FriendlySID:   Whether to return SID attribute values in a human readable format.

When inspecting object attributes this setting determines whether SID attributes such as "objectSid" are returned as binary objects or converted into a human readable string such as "S-1-5-21-4272240814-246508344-1325542772-12464". When set to True a friendly string value is returned. When set to False (default) a binary object is returned.

RequestControls:   Controls to include in the request.

This setting may be used to specify LDAP controls in the request. The expected format is a space separated sequence of OIDs and hex encoded values. For instance a single control with a value of 04 may be sent like:

ldap.Config("RequestControls=1.2.826.0.1.3344810.2.3 04");
To send a control without a value specify only the OID. For instance:
ldap.Config("RequestControls=1.3.6.1.4.1.42.2.27.8.5.1");
ResponseControls:   Controls present in the response.

This setting holds the LDAP controls returned in the response (if any). The format is a space separated sequence of OIDs and hex encoded values. For instance:

Log(ldap.Config("ResponseControls"));
May output something like:
1.2.826.0.1.3344810.2.3 04
UseDefaultDC:   Whether to connect to the default Domain Controller when calling Bind.

If this setting is set to True ServerName does not need to be set before calling Bind in Active Directory domains. When True the cmdlet will query the system for the default Domain Controller and attempt to establish a connection with that server.

Note: This functionality is only available in Windows.
Note: This functionality is not available in Java.

DomainController:   Returns the name of the domain controller.

This setting may be queried to return the name of the default domain controller in Active Directory domains.

Note: This functionality is only available in Windows.
Note: This functionality is not available in Java.

IPPort Configuration Settings

ConnectionTimeout:   Sets a separate timeout value for establishing a connection.

When set, this configuration setting allows you to specify a different timeout value for establishing a connection. Otherwise, the cmdlet will use Timeout for establishing a connection and transmitting/receiving data.

FirewallAutoDetect:   Tells the cmdlet whether or not to automatically detect and use firewall system settings, if available.

This is the same as FirewallAutoDetect. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

FirewallHost:   Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost setting is set to the corresponding address. If the search is not successful, an error is returned.

NOTE: This is the same as FirewallHost. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

FirewallPassword:   Password to be used if authentication is to be used when connecting through the firewall.

If FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the given firewall. If the authentication fails, the cmdlet throws an exception.

NOTE: This is the same as FirewallPassword. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

FirewallPort:   The TCP port for the FirewallHost;.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value.

NOTE: This is the same as FirewallPort. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

FirewallType:   Determines the type of firewall to connect through.

The appropriate values are as follows:

0No firewall (default setting).
1Connect through a tunneling proxy. FirewallPort is set to 80.
2Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
3Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.

NOTE: This is the same as FirewallFirewallType. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

FirewallUser:   A user name if authentication is to be used connecting through a firewall.

If the FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the Firewall. If the authentication fails, the cmdlet throws an exception.

NOTE: This is the same as FirewallUser. This setting is provided for use by cmdlets that do not directly expose Firewall properties.

KeepAliveTime:   The inactivity time in milliseconds before a TCP keep-alive packet is sent.

When set, TCPKeepAlive will automatically be set to true. By default the operating system will determine the time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.

Note: This value is not applicable in Java.

KeepAliveInterval:   The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.

When set, TCPKeepAlive will automatically be set to true. A TCP keep-alive packet will be sent after a period of inactivity as defined by KeepAliveTime. If no acknowledgement is received from the remote host the keep-alive packet will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds. This system default if this value is not specified here is 1 second.

Note: This value is not applicable in Java or MAC.

Linger:   When set to True, connections are terminated gracefully.

This property controls how a connection is closed. The default is True.

In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the cmdlet returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.

LingerTime:   Time in seconds to have the connection linger.

LingerTime is the time, in seconds, to leave the socket connection linger. This value is 0 by default, which means it will use the default IP protocol timeout.

LocalHost:   The name of the local host through which connections are initiated or accepted.

The LocalHost setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the cmdlet initiate connections (or accept in the case of server cmdlets) only through that interface.

If the cmdlet is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort:   The port in the local host where the cmdlet binds.

This must be set before a connection is attempted. It instructs the cmdlet to bind to a specific port (or communication endpoint) in the local machine.

Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxLineLength:   The maximum amount of data to accumulate when no EOL is found.

MaxLineLength is the size of an internal buffer, which holds received data while waiting for an EOL string.

If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.

If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.

The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes. The maximum value is 65536 bytes.

MaxTransferRate:   The transfer rate limit in bytes per second.

This setting can be used to throttle outbound TCP traffic. Set this to the number of bytes to be sent per second. By default this is not set and there is no limit.

ProxyExceptionsList:   A semicolon separated list of hosts and IPs to bypass when using a proxy.

This setting optionally specifies a semicolon separated list of hostnames or IP addresses to bypass when a proxy is in use. When requests are made to hosts specified in this property the proxy will not be used. For instance:

www.google.com;www.nsoftware.com

TCPKeepAlive:   Determines whether or not the keep alive socket option is enabled.

If set to true, the socket's keep-alive option is enabled and keep-alive packets will be sent periodically to maintain the connection. Set KeepAliveTime and KeepAliveInterval to configure the timing of the keep-alive packets.

Note: This value is not applicable in Java.

UseIPv6:   Whether to use IPv6.

When set to 0 (default), the cmdlet will use IPv4 exclusively. When set to 1, the cmdlet will use IPv6 exclusively. To instruct the cmdlet to prefer IPv6 addresses, but use IPv4 if IPv6 is not supported on the system, this setting should be set to 2. The default value is 0. Possible values are:

0 IPv4 Only
1 IPv6 Only
2 IPv6 with IPv4 fallback

TcpNoDelay:   Whether or not to delay when sending packets.

When true, the socket will send all data that is ready to send at once. When false, the socket will send smaller buffered packets of data at small intervals. This is known as the Nagle algorithm.

By default, this config is set to false.

Socket Configuration Settings

AbsoluteTimeout:   Determines whether timeouts are inactivity timeouts or absolute timeouts.

If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.

Note: This option is not valid for UDP ports.

FirewallData:   Used to send extra data to the firewall.

When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).

InBufferSize:   The size in bytes of the incoming queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize:   The size in bytes of the outgoing queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the cmdlet is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

UseBackgroundThread:   Whether threads created by the cmdlet are background threads.

If set to True, when the cmdlet creates a thread the thread's IsBackground property will be explicitly set to True. By default this setting is False.

UseInternalSecurityAPI:   Tells the cmdlet whether or not to use the system security libraries or an internal implementation.

By default the cmdlet will use the system security libraries to perform cryptographic functions. When set to False calls to unmanaged code will be made. In certain environments this is not desirable. To use a completely managed security implementation set this setting to True. Setting this to True tells the cmdlet to use the internal implementation instead of using the system's security API.

Note: This setting is static. The value set is applicable to all cmdlets used in the application.

When this value is set the product's system DLL is no longer required as a reference, as all unmanaged code is stored in that file.

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
NetCmdlets 2016 - Version 16.0 [Build 7240]