Blog Post

Skype for Business Blog
1 MIN READ

Remove a Contact

NextHop_Team's avatar
NextHop_Team
Brass Contributor
May 20, 2019
First published on TECHNET on Nov 12, 2010

For more information on using this script, see the article Adminstratively Managing User Contact Lists by Nick Smith.

#Contributed by Nick Smith, Microsoft

#Supported Versions: Office Communications Server 2007 R2

#Get User Information

$User = Get-WmiObject -Query "Select * from MSFT_SIPESUserSetting where PrimaryURI = 'sip: user@domain.com '"

#Get the contact on the user's contact list

$Contact = ( Get-WmiObject -Query "Select * from MSFT_SIPESUserContactData where UserInstanceID = '$UserInstanceID'" | Where { $_ .SIPURI -like "sip: userToDelete@domain.com " })

#Delete the contact

$Contact .Delete()


Updated May 20, 2019
Version 2.0
No CommentsBe the first to comment