Advertisement
Guest User

Email

a guest
Feb 13th, 2018
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Import-Module ActiveDirectory
  2. Get-ADUser -Filter * -Searchbase 'OU=Test,OU=test,DC=domain,DC=local' | Where {mail -like "*"} | ForEach-Object { Set-ADUser -EmailAddress ($_.sAMAccountName + '@domain.org') -Identity $_ }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement