How to delete attribute value in active directory

Опубликовано: 17 Октябрь 2024
на канале: It System
1,353
5

This section describes the powershell command used to delete data from attribute values on the active directory.
When this command is executed, the desired value is deleted on all users in the active directory.

First of all how many users in telephoneNumber also written data

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 ""} |