Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Troubleshoot Drive-Mapping Issues?

(image) Hey, Scripting Guy! We have this problem at work. Users seem to always be losing their mapped drives. It is a real mess, and we spend a couple hours every morning trying to help the users remap their drives. We have more than 160 logon scripts, and it seems that one logon script maps a drive, and then another remaps the drive ...

Hey, Scripting Guy! How Can I Map a Drive Based on the Computer’s Subnet?

(image) Hey, Scripting Guy! I have a CAD staff that occasionally travels between sites. What I would like to do, in a logon script, is map a set of drives based on their current location, that is, their current subnet. I need the script to first check and see if the drives are already mapped; if so then the script should just leave the ...

Hey, Scripting Guy! How Can I Map Drives Based on Membership in an Active Directory Group When the User Belongs to Multiple Groups?

(image) Hey, Scripting Guy! In yesterday’s column you showed a sample script that mapped a drive based on membership in an Active Directory group; along the way, you brought up the possibility of a user belonging to more than one group. “Suppose you have two groups,” you said. “What happens if a user is a member of both groups?” ...

Hey, Scripting Guy! How Can I Map Drives Based on Membership in an Active Directory Group?

(image) Hey, Scripting Guy! I need to map a drive based on a user’s membership in a particular Active Directory group. However, I have a twist as well: I need to map a different drive depending on whether or not the user is a manager. In other words, I need to map a drive based on both group membership and job title. How do I do that?-- SA...