Link to home
Start Free TrialLog in
Avatar of MarkIsrael
MarkIsraelFlag for United States of America

asked on

Need Script to set LOGONSERVER in Windows

I have an issue where some of my remote sites will not connect to the proper DC. This of course brings the login to a crawl. I would like a script to set the %LOGONSERVER% to my server. INPADHQDC1. So far I am having some problems finding out about the %LOGONSERVER% variable. All my users login to our DC but some of the other sites will try and connect too the wrong DC. We have multiple DC's and no roamers. I can't use the NET commands. TIA
SET \\INPADHQDC1 %LOGONSERVER%

Open in new window

Avatar of remmett70
remmett70
Flag of United States of America image

Do you have sites setup in AD Sites and Services?
SOLUTION
Avatar of sporgg
sporgg
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MarkIsrael

ASKER

You all have hit the nail on the head. Which in my case there isn't a solution I can do from where I sit. We have a small group of contractors that control all the AD Forests in our company. I have a DC at my site but I can't logon, or do a damm thing with it. Also, the same group has the DNS server. From what I have seen they are clueless about the workings of what DNS Servers do. It appears I'll have to see if they do anything about the local site.
Unless there is something I can do with DHCP or something of another fashion. I'll wait to see if anything else comes down and award points next week.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
We are talking about a WAN site. It is supposed use our DC but it tends to use the Denver DC. Even after it was setup on a differant TCP/IP address. At HQ we have a regular IP address. One that is registered with ICANN but the remote sites are on a private addressing scheme. We use the IP Helper command on our Cisco Routers to tell the computer where to find the DHCP Server which I have control over.
Also, I am wondering if the DC could be added to the HOSTS or LMHOSTS file to help the workstation look at our DC.  I am not sure how many DC's we have but the top of tree is Denver and Washington. When it hits the Denver DC all traffic runs at a snails pace.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As you can't do it by your self, ask the networking guys to use AD Sites and Services for configuring the network to have separate sites for Denver and Washington and assign the different subnets to the correct site.
Hi there,

If you have a firewall installed on the computers you could set the firewall to deny access to the AD ports on outside server. This should force the computers to use your local ad server. The ports you would need to restrict are Kerberos: 750 & LDAP: 389. Would recommend testing this out before trying it on a live system.

Regards

Sporgg