Link to home
Get AccessLog in
Avatar of jct_777
jct_777Flag for Kuwait

asked on

Windows Server 2012

Dear All,

Here in my organisation Windows server 2012 is installed. Active directory & group policy is also cofigured.  I want to map multiple network drives for some users in certain OU's .
I want to know how to configure multiple network drives  for some users through users logon script.  How can i do it.  

Also group policy for  wallpaper is working fine for  some of the computers. Remaining its shows black background. In startup it shows the Wallpaper but when the pc is up it shows black background. Client pc's= windows 7 & windows 8. shared wallpaper in in jpeg format.

Above configuration was  done by some other person.
Note :- I am new to server side.

Help needed urgently.


Avatar of JAN PAKULA
Flag of United Kingdom of Great Britain and Northern Ireland image

Save this batch file to the domain controller's NETLOGON share as login.bat

copy paste to txt(notepad) and save (without lines)  and then rename it extension from
*.txt to  *.bat


@echo off
net use * /delete /yes
net use x: \\server_name\shared_directory_name


and then link it to group policy OU in AD

Edit the SoftwareUnitGPO

Click: Start | Administrative Tools | Group Policy Management
This will bring up the Group Policy Management Tool.
Navigate To: Forest: bailiwick.local | Domains | bailiwick.local | Group Policy Objects | SoftwareUnitGPO
Right Click: the SoftwareUnitGPO
This will bring up the context menu.
Click: Edit...
This will bring up the Group Policy Management Editor.
Navigate to:
User Configuration | Policies | Windows Settings | Scripts (Logon/Logoff)
See screen shot to the right.
Right Click:   choose: Properties.
This brings up the "Logon Properties" dialog (not shown here).
Click: Add... button
This brings up the "Add a Script" dialog (not shown here).
Click the Browse button.
This brings up the "Browse" dialogue (see below)

more here:


or better solution would be to use Group Policy Preferences


there is a hotfix from MS
Avatar of jct_777



For configuring multiple network drives at logon for some users can i use like this:-

@echo off
net use * /delete /yes
net use H: \\server_name\shared_directory_name
net use I: \\server_name\shared_directory_name
net use J: \\server_name\shared_directory_name
net use K: \\server_name\shared_directory_name

then i will save it in .bat file. go to user properties  then in logon script I will type the batch file name i.e. logon.bat or whatever the name is.

Is it ok .

yes look perfect

if you dont have group policy management in system

you can put this bat file in start menu startup folder

in run type

shell:common startup
one more think i wouldn't start from H

I have seen some computers with 8 local drives (due to memory card readers + 2 dvd drives)

start from something like


if you can
Avatar of jct_777


Thanks for the help. after running the above command do i need to select connect option  in user properties or above mentioned command is sufficient for mapping multiple network drives.


If your using logon scripts your working to hard! Configure drive map preferences in group policy and configure the filter based on group membership, then all the drive mapping can be configured in one policy.

For example: All users get an H: drive for Home directory
Members of Marketing get a drive mapping to M: marketing share
Members of accounting get a drive mapping for M: Accounting share
Users running windows XP get a drive mapping to X: XP share

A walk through

Using preferences is a much more robust way to map drives
@ jct_777

above command is enough


I have suggested using GPP - But is seams that author prefers using logon script


or better solution would be to use Group Policy Preferences

Avatar of jct_777



So with group policy i can map  multiple newtork drives to some users in differnt OU's

Which one is good to use logon script  or  through group policy .

Please help.

Avatar of JAN PAKULA
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
Yes you can map different drives to different sets of users, I would create a test group policy and play with them, there really is a lot you can do with them
Avatar of jct_777



Mapping network drive i check by doing tomorrow & will update.
But regarding the wallpaper i already applied the above hotfix from microsoft . But of no use.

If  I go to the control panel-ease of access center-make the computer easier to see-then tick or untick remove background  images -ok. I get the wallpaper that is appled through GP. But when I restart the pc same old black background. Again iI have to go to the above option & untick the Remove background images.

Please help

Avatar of Detlef001

Mapping drives for users has been a task IT has needed to do since the first network drive. Yet getting those drives correctly provisioned to users isn't a task that's come easily ' even with today's newer technologies like PowerShell and Group Policy Preferences.

Please have a look at these links for the reference.