Creating and modifying Contact Teams with EWS and Powershell

Creating and modifying Contact Teams with EWS and Powershell Mailbox Contact Teams have been round for some time and whereas there are a selection of different Group choices in Change from a customers perspective these are nonetheless probably the most environment friendly methods of making Distribution teams. I’ve up to date my EWS PowerShell Contacts module to help creating and modifying Contact Teams. So utilizing this module now you can

Create a ContactGroup in the default contacts folder of a Mailbox

Create-ContactGroup -Mailboxname [email protected] -GroupName GroupName -Members (“[email protected]”,”[email protected]“)

Add extra Members to that Group

$Group = Get-ContactGroup -Mailboxname [email protected] -GroupName GroupName $Group.Members.Add(“[email protected]“)
$Group.Replace(0)

This was simply utilizing the generic Add technique however there are a selection of strategies for including several types of contacts comparable to MailEnalbed Public Folders,ContactGroups,Listing Customers and many others see https://msdn.microsoft.com/en-us/library/workplace/microsoft.alternate.webservices.information.groupmembercollection_methods%28v=exchg.80%29.aspx

Delete the Group
$Group = Get-ContactGroup -Mailboxname [email protected] -GroupName GroupName
$Group.Delete(2)

 The Contacts Module is up on GitHub https://github.com/gscales/Powershell-Scripts/tree/grasp/EWSContacts you may download a zipper from right here

Leave a Reply