Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Verify Domain Controller

Posted on 2006-11-24
5
Medium Priority
?
437 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

609 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