Solved

Login scripts

Posted on 2011-03-21
7
405 Views
Last Modified: 2012-06-21
I'm trying to add a simple login script for users and selected users:  For example:
net use p: \\servername\public /persistent:yes

I went to Group Policy Management-Default Domain Policy-Edit-User Configuration-Windows Settings-Scripts-Logon-Show Files and then pasted the logon.txt file that I created.

I then ran GPUPDATE /force

However, when I log into my computer the P drive is not mapped, or any other commands that I've specified in my logon.txt file.

Am I doing something wrong?
0
Comment
Question by:markrkelley123
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 75 total points
ID: 35183862
login.txt?  It should be login.bat or login.cmd - assuming everything else has been done correctly.  (and I wouldn't say persistent:yes - if you make it persistent, why are you using a login script?).
0
 

Author Comment

by:markrkelley123
ID: 35183879
Ohh.  Good point.  I need to change it to LOGON.BAT.

I made it persistent so that way it comes back if someone disconnects the drive mapping.  Should I not?
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 35183905
The script runs EVERY TIME someone logs in... so it reconnects with every login.  (Actually if you have 2008 DCs, I believe you can map drives using Group Policy Preferences instead).
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 2

Expert Comment

by:ReesAssociates
ID: 35183914
After you change the name to .bat, run gpupdate.  Then lookup the results on your login test in the group policy editor.  This will let you know which settings were successfully implemented.
0
 

Author Comment

by:markrkelley123
ID: 35183980
Still doesn't work.  Are you refering to the Settings tab that generates reports or the GPRESULT command?
0
 
LVL 2

Expert Comment

by:ReesAssociates
ID: 35184073
Yes that is it.  Just wanted to make sure that it was recognizing your settings correctly and the correct GPO.

Have you tested the script by adding it to your test account in active directory?  
0
 
LVL 16

Assisted Solution

by:cantoris
cantoris earned 50 total points
ID: 35185170
As well as clicking show files and pasting it in, have you actually added it by name to the list of logon scripts in that group policy object?
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server 2000 functional level to server 2008 r2 5 69
Trust one-way issue 2 52
Dentrix G4 1 47
Intel Server Board SE7525GP2 Doesn't Recognize Full Hard Drive Capacity 4 83
The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
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.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

911 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

20 Experts available now in Live!

Get 1:1 Help Now