Cmdlets for Microsoft Active Directory

Build 24.0.9060

Update-AD Cmdlet

Parameters   Output Objects  

Updates Microsoft Active Directory data.

Syntax

Update-AD [parameters]

Remarks

The Update-AD cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Microsoft Active Directory data.

$conn = Connect-AD -User 'MyUserName' -Password 'MyPassword' -Server 'MyServer' -Port 'MyPort' -BaseDN 'MyDN'
Update-AD -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-AD -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-AD -Connection $conn -Table User -Where "CN = 'Administrator'" | Update-AD -Columns @("CN") -Values @("Administrator 2")

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