Remove-LDAP Cmdlet
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