Solved

Verify Domain Controller

Posted on 2006-11-24
5
382 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
5 Comments
 
LVL 3

Accepted Solution

by:
joachim.claeys@teleatlas.com earned 63 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 62 total points
ID: 18015777
"set logonserver" will give you the result of which DC is being logged on to
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.

Join & Write a Comment

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

21 Experts available now in Live!

Get 1:1 Help Now