Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We've had some login issues in our computer lab environment. When a class of 15-30 people try to log in at the beginning of class, they sometimes have to wait upwards of 20 minutes to get a desktop. We've tracked most of this delay down to some DNS issues. However, whenever we want to run a test, we have to manually walk around the lab and log computers in. Is there a way we can script this? I come from a *nix background. I suspect this should be possible, but googling for "scripts" related to "logging in" only gives me threads about logon scripts.

We are running Windows Server 2008 R2 with Windows 7 clients. Ideally I would like to run a script that takes 30 test users and logs each one of them into one of the lab machines.

share|improve this question
    
So you want to simulate a full interactive login? –  uSlackr Feb 3 '12 at 17:30
    
Yes, if possible. –  Cocoabean Feb 3 '12 at 18:00

2 Answers 2

up vote 4 down vote accepted

If I were you I'd use a Group Policy Object to specify AutoAdminLogon settings on the computers and then mass boot them. Assuming they all boot at roughly the same rate that'll cause a barrage of logon traffic. Be aware that using this Group Policy template will "tattoo" the registry so you'll need to create an "anti-policy" to apply to the computers to delete the registry values the autologon policy will create. I generally just create both, link them both to the OU with the "anti-policy" at a higher "priority" (i.e. applied later in the Group Policy application process), and then disable the link on the "anti-policy" so that I can, at any time, re-enable the link and have it take effect.

re: troubleshooting this issue - Assuming you have a single Windows Server machine you should look at capturing all the network traffic to/from that machine during your testing to look for clues.

I'm assuming you have the clients configure only with DNS servers running on Domain Controller computers (or, if you don't, the DNS servers you've got them using can resolve records from the AD domain).

share|improve this answer
    
Retired DCs who's hostnames we recycled managed to turn on in the middle of the night. They poisoned the DNS cache of the 2 current DCs so that when they went to look for home folders and profiles, they got IP addresses for the old boxes. We have a BIND server as well that we primarily use for our DNS, so any 'nslookup' would resolve to the IPs we expected. –  Cocoabean Feb 3 '12 at 18:15

I don't see how you can run a script on a non-logged in desktop, but you can setup Windows clients to login automatically. This link has some information on it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.