Dynamic Group Executing server

Hello Experts,

I have a need to ensure all Dynamic groups are executing off of only 3 servers in my environment.

I have 6 ARS servers and have a script to move them to the other servers not a problem. I'm wondering if there is a policy or a workflow that anyone can suggest so that upon update to dynamic from basic the servers wanted are selected or put in place.

I have a script i tried with a workflow on post change to a Dynamic but it does not seem to work. It still selects the server that the dynamic group is being created on.

I see in the change history on the group that the change was made but it seems that it occurs first and the regular process still sets the designated server being used.

function onPostModify($Request)
{
$ars1 = "ars-server1.domain.com"
$ars2 = "ars-server2.domain.com"
$ars3 = "ars-server3.domain.comm"

switch(Get-Random -Minimum 0 -Maximum 4) 
{
1 {$arsServer = $ars1}
2 {$arsServer = $ars2}
3 {$arsServer = $ars3}
}

$arsServer
}

Thanks for any help!

Lu