Quick Tip: Copy Users Between Response Groups

Just a quick one, Had to do this for a customer recently where there was a bunch of users in an existing response group and they needed to be copied to a new one.

Instead of copying them one by one just run this and you will have time left over for coffee.. (or writing this blog post)

$OldGroup = (Get-CsRgsAgentGroup -Name "Helpdesk Group")
$NewGroup = (Get-CsRgsAgentGroup -Name "Helpdesk Overflow")

Foreach ($User in ($OldGroup.agentsbyuri))
{
    $NewGroup.AgentsByUri.Add($User.AbsoluteUri)
}

Set-CsRgsAgentGroup -Instance $NewGroup

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.