Here To Stay
Posted - 10/13/2009 : 4:29:24 PM
We have previously been using a logon script to map network drives. Because the drive letters and/or UNC paths might need to change from time to time (for example, moving a shared folder from one server to another, which would require the drive mapping's path to change), I got in the habit of having the logon script first delete the drive mapping and then create it. This prevents the issue in which a network drive does not map because there is already a network drive mapped using that drive letter.
For example, let's say I have a share called "Data" on a file server names FS1. I want to map this as drive J: and want to use a logon script to do so. My script would look like this:
NET USE J: \\FS1\DATA
Now let's say I need to move the DATA share from FS1 over to a new file server I'll call FS2. So, I copy the DATA share over to FS2 and re-apply the share permissions. Now, I can't just change the script to read:
NET USE J: \\FS2\DATA
because when the script runs, there is already a mapped network drive on the client computers that maps J: to \\FS1\DATA. The new mapping won't re-use/overwrite the existing drive mapping. To get around this, the script must first delete any drive mapping that points to J: and then create the new mapping. It looks like this:
NET USE J: /DELETE
NET USE J: \\FS2\DATA
Okay, now everything runs smoothly. If I ever need to point drive J: to a different server/share, I just need to update the UNC path in the logon script. There is no collision since the J: drive mapping is being deleted and re-created each time the logon script is invoked at user logon.
Now comes the question:
I want to move over to using Group Policy Preferences instead of a batch logon script. The process to create mapped network drives is pretty straightforward in GPP, except for the "Action Mode".
I have to chose between:
Create (Create the object only if it does not already exist)
Replace (Delete the object first, then create it)
Update (Create the object if it does not exist; otherwise modify it)
Delete (Delete the object)
Migrate (Modify an item if it exists; otherwise, do nothing)
"Migrate" does not appear as a choice for a mapped network drive, so that one is out.
To replicate my current process whereby the logon script first deletes the mapping and then creates the mapping, I'm confused on which remaining option to choose.
First, is this even still necessary to first delete the mapping and then re-create it so that if I were to need to change the path, there would not be a conflict? I wonder if GPP drive mappings do not suffer from this issue?
Second, it seems that "Replace" is the right choice, assuming that it is still necessary to delete then create the mapping.
Third, maybe "Update" does the trick? Would setting it to "Update" map the drive, but re-point the path if the path changed?
"Delete" seems to be the obvious choice, but maybe "Update" is better, since it would not require two actions (delete then create).