My compant migrated from exchange to microsoft 365. I am unable to copy users unless I delete all the show in address book attributes. i found a PS script to run but I am getting errors. probably just from my lack of PowerShell knowledge.<\/p>\n
get-aduser -Filter * -SearchBase \"ou=users,ou=First-OU,dc=DOMAIN,dc=local\" -properties showInAddressBook | Set-ADUser -Clear showInAddressBook\n<\/code><\/pre>\n
Advertisement
in the script I changed ou= to our OU with users in it. There are sub OUs under this though for specific locations. I also changed DOMAIN to our domain name.<\/p>\n
Advertisement
this is the error I get in powershell ISE<\/p>\n
get-aduser : Directory object not found
\nAt C:\\Users\\admin-mg\\Desktop\\remove show in address book.ps1:1 char:1<\/p>\n
\n- get-aduser -Filter * -SearchBase \"ou=SPH-Users,ou=Canton-Users,dc=Sta …<\/li>\n
- \n
<\/code><\/pre>\n<\/li>\n- CategoryInfo : ObjectNotFound: (
[Get-ADUser], ADIdentityNotFoundException<\/li>\n - FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Microsoft.ActiveDirectory.Management.Commands.GetADUser<\/li>\n<\/ul>","upvoteCount":3,"answerCount":6,"datePublished":"2021-04-21T14:53:54.000Z","author":{"@type":"Person","name":"mattgeorge","url":"https://community.spiceworks.com/u/mattgeorge"},"acceptedAnswer":{"@type":"Answer","text":"