Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Unable to delete Exchange contacts via Powershell

$
0
0

I have some contacts in Microsoft 365 online that I cannot remove. They do not appear in the Contacts area of the admin console, nor the exchange admin center, but are causing problems because I cannot update the contacts with new data.
I don't know how they got in this state, or how to solve the problem.

If I use:

Get-Contact


The names are listed. If I use:

Get-MailContact


They are not. What this means is that

Remove-MailContact -Identity <blah>



Throws an error:

The operation couldn't be performed because object '<blah>' couldn't be found on <exchange server>


If I inspect the problem contacts using:

Get-Contact -Identity <blah> | fl


I find that these values are the different ones

RecipientType            : Contact
RecipientTypeDetails     : Contact

Correct MailContacts have the value "MailContact" in these fields.

How can I delete these contacts?  There does not appear to be a "Remove-Contact" method.  Is there a way to remove a general exchange object by Guid (for example)?


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>