Update-LDAP Cmdlet
Updates LDAP data.
Syntax
Update-LDAP [parameters]
Remarks
The Update-LDAP cmdlet allows you to use a syntax similar to SQL UPDATE statements to update LDAP data.
$conn = Connect-LDAP -User 'MyUserName' -Password 'MyPassword' -Server 'MyServer' -Port 'MyPort' Update-LDAP -Connection $conn -Table "User" -Columns @("CN") -Values @("Users") -Id "CN=User Name,CN=Users,DC=Domain"The Where parameter can also be used to specify the primary key of the table:
Update-LDAP -Connection $conn -Table "User" -Columns @("CN") -Values @("Users") -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'" | Update-LDAP -Columns @("CN") -Values @("Administrator 2")