Thanks for the reply.
It's mystery for me too. I am using the same powershell window (remote shell) and I can add the Agent Group without problem but can't remove. One thing I notice when I add the agent group I get the 0 as response but I don't get any response when I remove
the agent group from the queue.
Here is my capture from the powershell window. You can see you get the 0 back after you add the agent group but when I remove I don't get any result back.
PS D:\> $x = Get-CsRgsQueue -Identity "service:ApplicationServer:lyncse6.lync6.com" -Name "queue8"
PS D:\> $x.AgentGroupIDList
PS D:\> $agentGroup = (Get-CsRgsAgentGroup -Identity "service:ApplicationServer:lyncse6.lync6.com" -Name "rgs2").Identity
PS D:\> $agentGroup
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\> $x.AgentGroupIDList.add($agentGroup)
0
PS D:\> $x.AgentGroupIDList
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\> Set-CsRgsQueue -Instance $x
PS D:\> $x.AgentGroupIDList
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\> $x = Get-CsRgsQueue -Identity "service:ApplicationServer:lyncse6.lync6.com" -Name "queue8"
PS D:\> $x.AgentGroupIDList
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\> $agentGroup = (Get-CsRgsAgentGroup -Identity "service:ApplicationServer:lyncse6.lync6.com" -Name "rgs2").Identity
PS D:\> $agentGroup
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\> $x.AgentGroupIDList.Remove($agentGroup)
PS D:\> $x.AgentGroupIDList
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\> Set-CsRgsQueue -Instance $x
PS D:\> $x.AgentGroupIDList
ServiceId InstanceId NonNormalized
--------- ---------- -------------
1-ApplicationServer-1 fec707c2-19a6-45c7-8232-78fc5ff38087 fec707c2-19a6-45c7-8232-78fc5ff38087
PS D:\>