Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import-Module ActiveDirectory
- 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