Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Remove SMTP from AD attribute

$
0
0

Hello all,

I need to remove some SMTP addresses for a domain that will be going away. My plan is to round up the users who are no longer receiving at the address, and put there usernames in a csv file. Then run the below at the end of the day. Am I going about this the right way?

$users = names.csv foreach($user in $users){ Set-ADUser -Identity $users -Remove {$_.proxyAddresses -eq "*@domain.com"} } 

submitted by /u/grrrrshell
[link] [comments]

The post Remove SMTP from AD attribute appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images