Cmdlets for LDAP

Build 24.0.9060

Remove-LDAP Cmdlet

Parameters   Output Objects  

Deletes LDAP data.

Syntax

Remove-LDAP [parameters]

Remarks

The Remove-LDAP cmdlet allows you to use a syntax similar to SQL DELETE statements to delete LDAP data.

$conn = Connect-LDAP -User 'MyUserName' -Password 'MyPassword' -Server 'MyServer' -Port 'MyPort'
Remove-LDAP -Connection $conn -Table "User" -Id "CN=User Name,CN=Users,DC=Domain"
The Where parameter can also be used to specify the primary key:
Remove-LDAP -Connection $conn -Table "exTablePowershell;" -Where "Id = CN=User Name,CN=Users,DC=Domain"
The primary key can also be passed to the cmdlet along the pipeline:
Select-LDAP -Connection $conn -Table User -Where "CN = 'Administrator'" | Remove-LDAP

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060