Solved

Verify Domain Controller

Posted on 2006-11-24
5
426 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 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 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