[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

GPOs & Logon scripts

Posted on 2014-02-19
9
Medium Priority
?
373 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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
LVL 23

Expert Comment

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

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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

656 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