Solved

GPOs & Logon scripts

Posted on 2014-02-19
9
364 Views
Last Modified: 2014-06-11
I'm trying to change the logon script for the users located under a particular OU. They currently have their home directory pointing to U: \\servername\users\%username%. I want to change it to U: \\network\users\%username%. I added the following command lines to the logon script:

net use u: /delete
net use u: \\network\users\%username%

Saved the file and then closed it. But when I logon as a user from this OU or try and force GOP updates by running the gpupdate command. The user's U: drive continues to point to the \\servername\users\%username% instead of \\network\users\%username%

What step am I missing?
0
Comment
Question by:dowhatyoudo22
9 Comments
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39871313
If now trying by GPO is there any chance of a logon script given to the user in AD?
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 39871314
how do users have set that \\servername\users\%username%?
also with GPO you unlinked from that OU?
or do they have it set i user account properties as home folder?
0
 

Author Comment

by:dowhatyoudo22
ID: 39871400
there is a logon script configured in the user profile>logon script field under the profile tab in ADUC. How do I find that script?
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39871415
In sysvol folder
0
 
LVL 35

Expert Comment

by:Mahesh
ID: 39871425
try below
net use * /d /y
net use U: \\network\users\%username%

Just ensure that Home drive is not set in AD user properties with same drive letter as previous, otherwise it will apply 1st on user logon and your batch file is getting ignored.

One another way:
Select all affected users in OU and go to properties.
On profiles tab enter new path with new drive letter with \\network\users\%username% variable for all users and select apply
This will pre create home folders for all affected users in advance

Then add batch file as a user logon script
net use u: /d /y
where U: represents old drive map letter pointing to old path

Mahesh
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 39872001
A script defined as just "batchfile.cmd" without a path in the user login script setting will be in the NETLOGON share which is in C:\Windows\SYSVOL\sysvol\domain.local\SCRIPTS by default on your DC's.

Probably easiest would be to blank out what that script does, implement it using script in the other OU's and new one in the OU you want.

Or better do without the scripts and use group policy preferences.  You just define a drive, where it maps to and any conditions such as group memberships and it does it for you as part of policy during logon.

Steve
0
 

Author Comment

by:dowhatyoudo22
ID: 39887096
I was able to locate the script, that is assigned under AD for these users. Thanks!! It doesn't really do anything but replace host files. Their home drive's are configured under AD and they have a script via group policy that maps the drive as intended.

adding the delete command and then trying to recreate the mapped drive to another location doesn't still doesnt work. Its only a hand full of users so I'm just making the changes manually. For now....
0

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now