Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Power Shell to Remove Email Address

$
0
0

I've got a txt file that has 180 email address that need to be removed from user accounts within our AD and I'd prefer to do it via a Power shell script versus manually, mostly because I know there will be another list of coming out soon. I have all the email address in a single text file and basically I want to simply remove the email address from the corresponding user in Active Directory.  Though I'd like a script that does both find the user and remove the email address, I need to do it in two steps.  I need to find the users corresponding to the email first so I can confirm there aren't multiple users using that email and then the second step of removing the email address from that account.  I don't want to disable the users.  I have very little knoweldge of Powershell or scripting so most google searches end up with example scripts that doesn't fit what I'm needing to do.  Any suggestions or examples anyone can share would be greatly appreciated.

Thanks,
Bob


Viewing all articles
Browse latest Browse all 21975

Trending Articles