I need a scripted solution (preferrably powershell) to modify the LDAP parameter called MaxConnIdleTime on Server 2016. I found that there is a command line executable called ntdsutil.exe, however, using ntdsutil to set the MaxConnIdleTime requires launching the program, and entering sub-menus to change the setting:
At the "ntdsutil:" prompt, enter "LDAP policies", At the "ldap policy:" prompt, enter "connections" , At the "server connections:" prompt, enter "connect to server [host-name]" (where [host-name] is the computer name of the domain controller), At the "server connections:" prompt, enter "q", At the "ldap policy:" prompt, enter "Set MaxConnIdleTime to [new value]", Enter "Commit Changes" to save
Is it possible to script passing multiple commands to ntdsutil in sequence, or skip ntdsutil and modify the setting another way with powershell? I couldn't find any powershell cmdlets with this level of control over LDAP settings.