40 C
Dubai
Thursday, August 11, 2022
spot_img

Copy and Paste Active Directory Attributes using PowerShell

Active Directory Powershell saves you hours of manual work where in this case i was asked to copy office name to ipphone attribute in bulkf for all users. it took only 5 mins for 3000 users. It all matters how well you use your powershell skills

Copying Office Name to IpPhone attribute in Bulk


$USERS = Get-ADUser -Filter {DisplayName -like "test1*"} -Properties physicalDeliveryOfficeName,Ipphone
foreach($user in $USERS)
{
$copy = $user.physicalDeliveryOfficeName
Set-ADUser $user -Replace @{ipPhone=$copy}
}

Clear the attributes using Powershell

Set-ADUser $_.samaccountname -Clear extensionAttribute10
Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Specialized in Microsoft Azure - Office 365 / Microsoft Exchange; conducted numerous projects worldwide in designing, supporting, and implementing messaging and virtualization infrastructure for medium-sized and large enterprises. Further, I am a Cloud Architect and Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here