Solved

GPOs & Logon scripts

Posted on 2014-02-19
9
369 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 20

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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 20

Expert Comment

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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.
In-place Upgrading Dirsync to Azure AD Connect
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

821 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