Clear an Attribute in AD for all users

HI


I am trying to clear an attribute in AD for all users. the Attribute is the Mobile Number but I need to make sure the script will work.  can someone tell me if the command below will do the job.


Set-ADUser -clear MobilePhone
LVL 4
SEHCAsked:
Who is Participating?
 
Will SzymkowskiSenior Solution ArchitectCommented:
Use the following command...
Import-module activedirectory
Get-ADUser -Filter * -properties MobilePhone | Set-ADUser -MobilePhone $null

Open in new window


Will.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.