Solved

GPOs & Logon scripts

Posted on 2014-02-19
9
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 23

Expert Comment

by:Patrick Bogers
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39871415
In sysvol folder
0
 
LVL 37

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

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

688 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