Map a network

  • Thread starter Thread starter John
  • Start date Start date
J

John

I need to change a drive mapping from one server to
another, I have to do this for 75 Terminal server users.
What's the easiest way to achieve this without disrupting
user service? Can I apply a mapped drive through GP to
the Terminal server? IF so, How? Please keep in mind
that I have never written, used or deployed a logon
script. Any helpfull insight is appreciated.

Thank you.
 
You can certainly use a login script within the GPO. Just create a batch
file (a notepad file with a .BAT extension) with the following syntax:

net use <drive letter>: \\SERVER\SHARE

For example:

net use h: \\fileserver1\data

This will map the H: drive to the data share on fileserver1 for every user
that gets the GPO and logon script.
 
Here is another example with in a .vbs file.

On Error Resume Next

Dim net, DomainString, UserString, UserObj

set net = Wscript.CreateObject("Wscript.Network")

DomainString = net.UserDomain
UserString = net.UserName


Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)

For Each GroupObj In UserObj.Groups
Select Case GroupObj.Name

Case "FLEN"
' *** Connect Network Drives by group

net.MapNetworkDrive "G:", "\\CHRISSE201\VOL1\gemensam"

' *** Add printers by gorup

net.AddWindowsPrinterConnection "\\wks002\PRINT01"
net.AddWindowsPrinterConnection "\\wks002\PRINT02"

' *** Set default printer

net.SetDefaultPrinter "\\wks002\PRINT02"

Case "JÖNKÖPING"
' *** Connect Network Drives to Group

net.MapNetworkDrive "G:", "\\JUMS2\VOL1\gemensam"

End Select
Next

Set UserObj = Nothing
Set GroupObj = Nothing
Set net = Nothing
Set DomainString = Nothing
Set UserString = Nothing

--
Regards,

Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1
 
Back
Top