Hi,

I've written a very basic script to map network drives based upon the AD group membership.

Here is the crux of the script:

use q: /delete

If MemberOf("HR Users");
use q: "\\Server\HR"
EndIf;

For a test, I placed myself in this group "HR Users" and ran the script. It mapped fine. I then removed myself from the group and ran the script again to remove the drive. It still mapped the drive however, so I thought maybe it was a delay with Active Directory. Anyway, I checked this through the 'gpresult' utility and it came back showing that I was not in this group anymore, so I ran the script again and it still thinks that I'm in the HR group. We have 3 DC's and they are all sync'd fine and not showing me as a memeber of this group. It's been several days now and it's still mapping this drive.

As a test, I added a colleague last week to the group and it mapped fine. I then removed them from the group and it is still mapping the drive.

Any thoughts? Is there a better, quicker way to reference which group they are in?

Thanks,

Rob