?
Solved

Verify Domain Controller

Posted on 2006-11-24
5
Medium Priority
?
433 Views
Last Modified: 2012-05-05
I am writing batch file to verify the stage of DC. How can i find out:

1. The server is DC. Is there any special service is running?
2. How can I write simple command to verify authetication process to specific DC?

Thanks in Advance
0
Comment
Question by:plusign
[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
5 Comments
 
LVL 3

Accepted Solution

by:
joachim.claeys@teleatlas.com earned 252 total points
ID: 18010599
Here's how to check if it's a domain controller:

@echo off
setlocal
set test=nltest /dclist:%USERDNSDOMAIN%
set fnd1=Findstr /C:"Site:"
set fnd2=Find /I "%ComputerName%"
set dc=N
for /f "Tokens=1 Delims=. " %%d in ('%test%^|%fnd1%^|%fnd2%') do (
 set dc=Y
)
if "%dc%" EQU "N" goto nodc
@echo Domain controler
endlocal
goto :EOF
:nodc
@echo No DC
endlocal

I don't know of a way to authenticate using a batch file.
0
 
LVL 48

Assisted Solution

by:Jay_Jay70
Jay_Jay70 earned 248 total points
ID: 18015777
"set logonserver" will give you the result of which DC is being logged on to
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 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