The problem is not solved.

I ran the script in debug mode (/d)from an interactive prompt on the problem server to see if the script really is processing correctly, as Richard asked me to.

I use the same script as under Example logonscript. The only difference is that when we go live there are more mappings and groups.

I wrote that the sript is working fine with Windows Server 2003 Citrix servers and Windows Server 2008 Domain Controllers. I only have this problem with Windows Server 2008 R2 Citrix servers and (the same) Windows Server 2008 DC's.