https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ldap/extended-controls
const { Client } = require("ldapts");
const { Control } = require("ldapts/controls");
const url = "ldap://....";
const bindDN = "CN=ICT service,OU=app-users,DC=...,DC=...";
const password = "....";
const client = new Client({
url,
});
const main = async () => {
try {
await client.bind(bindDN, password);
const res = await client.del(
"CN=Super Man,OU=DISABLE users & computers,DC=...,DC=...",
new Control("1.2.840.113556.1.4.805")
);
console.log(res);
} catch (ex) {
throw ex;
} finally {
await client.unbind();
}
};
main();