How to Delete Attribute on Active Directory Users

How to Attribute Cleanup / Delete Attribute Value /

This section describes the command to delete data from the attribute on Active Directory through powershell. The Powershell command deletes the data in the attibute value that you want to delete on all user accounts on the active directory. For this reason, you must be very careful. My suggestion is to test the commands on the test active directory and then run the live system. You can install test active directory on Hyper-V or WMware in a short time. In this type of operation, it is absolutely beneficial to make the operation on the test system.

Through the command you can view how much value is available on the user account, with this command.

get-aduser -Filter * -ResultSetSize 1000000 -properties telephoneNumber | where {$_.telephoneNumber -notlike “”} | measure

All accounts in the command active directory delete the information in the atribute value. Please be carefull. Clearing values written in telephoneNumber clearing all users.

get-aduser -Filter * -ResultSetSize 1000000 -properties telephoneNumber | where {$_.telephoneNumber -notlike “”} | set-aduser -Clear telephoneNumber

Control

get-aduser -Filter * -ResultSetSize 1000000 -properties telephoneNumber | where {$_.telephoneNumber -notlike “”} | measure

Command Video

How to view the attibutes of users in Active Directory. Start – Run – dsa.msc is written.

Click View from the Active Directory Users And Computers screen. Advanced Features is selected on the screen that opens.

Navigate to the OU where the user account is located. Right-click on the account. Click Properties. Attribute editor tab is clicked.

Powershell
http://www.itsystem.tech/category/powershell

Subscribe to my channel

https://www.youtube.com/channel/UCP6cljH6p6lSQPyh-LgPM_w

You can watch the Active Directory installation for testing via video.
Windows Server 2019 Active Directory installation

Windows Server 2016 Active Directory installation

Windows Server 2008 Active Directory installation

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir