Skip to content

Instantly share code, notes, and snippets.

@tostka
Created July 17, 2019 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tostka/81023711d642c5167e86d55b5da3a014 to your computer and use it in GitHub Desktop.
Save tostka/81023711d642c5167e86d55b5da3a014 to your computer and use it in GitHub Desktop.
Clear ADUser mail-attributes on-prem
# note -whatif needs to be removed to execute
set-aduser -Identity $adu.samaccountname -clear msExchMailboxGuid, msexchrecipientdisplaytype, msexchrecipienttypedetails -whatif;
# confirm attributes cleared
get-aduser -Identity $adu.samaccountname -prop * | format-list msExchMailboxGuid, msexchrecipientdisplaytype, msexchrecipienttypedetails ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment