Edit

Set-LdapDirectory

This cmdlet is available only in the cloud-based service.

Use the Set-LdapDirectory cmdlet to modify LDAP directory configurations.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Default (Default)

Set-LdapDirectory
    [-Id] <String>
    -Organization <OrganizationIdParameter>
    [-BaseDn <String>]
    [-Confirm]
    [-Host <String>]
    [-NoSsl]
    [-Port <Int32>]
    [-TimeoutSec <Int32>]
    [-UseSsl]
    [-WhatIf]
    [<CommonParameters>]

Description

You need to be assigned permissions before you can run this cmdlet. Although this article lists all parameters for the cmdlet, you might not have access to some parameters if they aren't included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Examples

Example 1

Set-LdapDirectory -Organization contoso.onmicrosoft.com -Id FabrikamLdap -BaseDn "OU=Employees,DC=fabrikam,DC=com"

This example updates the base distinguished name that scopes searches for the LDAP directory configuration named FabrikamLdap.

Example 2

Set-LdapDirectory -Organization contoso.onmicrosoft.com -Id FabrikamLdap -Host ldap2.fabrikam.com -Port 636 -UseSsl -TimeoutSec 45

This example updates the connection settings for the LDAP directory configuration named FabrikamLdap to use a new host over a secure (SSL/TLS) connection on port 636 with a 45-second timeout.

Example 3

Set-LdapDirectory -Organization contoso.onmicrosoft.com -Id FabrikamLdap -Host ldap.fabrikam.com -Port 389 -NoSsl

This example disables SSL/TLS for the LDAP directory configuration named FabrikamLdap by using the NoSsl switch, and updates the connection to use the non-secure LDAP port 389.

Parameters

-BaseDn

Applicable: Exchange Online

The BaseDn parameter specifies the base distinguished name that scopes LDAP searches. For example, "OU=Users,DC=fabrikam,DC=com".

Parameter properties

Type:String
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

-Confirm

Applicable: Exchange Online

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

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

-Host

Applicable: Exchange Online

The Host parameter specifies the LDAP server host name or IP address.

Parameter properties

Type:String
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

-Id

Applicable: Exchange Online

The Id parameter specifies the unique identifier of the LDAP directory configuration that you want to modify.

Parameter properties

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

Parameter sets

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

-NoSsl

Applicable: Exchange Online

The NoSsl switch specifies that SSL/TLS is disabled for the updated connection settings. You don't need to specify a value with this switch.

Use this switch to turn off a secure connection that was previously enabled (for example, with the UseSsl switch).

You can't use this switch with the UseSsl switch in the same command.

Parameter properties

Type:SwitchParameter
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

-Organization

Applicable: Exchange Online

The Organization parameter specifies your organization where the LDAP directory configuration is stored (for example, contoso.onmicrosoft.com).

Parameter properties

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

Parameter sets

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

-Port

Applicable: Exchange Online

The Port parameter specifies the port used for LDAP communication. Typical values are 389 for LDAP and 636 for LDAPS.

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

-TimeoutSec

Applicable: Exchange Online

The TimeoutSec parameter specifies the LDAP connection timeout in seconds. A valid value is an integer between 1 and 300. The default value is 30.

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

-UseSsl

Applicable: Exchange Online

The UseSsl switch specifies that SSL/TLS is enabled for the updated connection settings. You don't need to specify a value with this switch.

You can't use this switch with the NoSsl switch in the same command.

Parameter properties

Type:SwitchParameter
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

-WhatIf

Applicable: Exchange Online

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

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.