Solved

servername in domain

Posted on 2010-08-18
9
457 Views
Last Modified: 2012-05-10
is there a command to check in dos prompt for existence of a server by its name?

thanks
0
Comment
Question by:anushahanna
[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
  • 4
  • 4
9 Comments
 
LVL 4

Expert Comment

by:trythisone
ID: 33466605
You can ping it.

Ping Servername

or

Ping Servername.domain.com

or

Ping 192.168.1.1 (whatever the IP address is)

If a ping replies it exists unless there is a firewall on the machine

0
 
LVL 1

Assisted Solution

by:GFCU
GFCU earned 50 total points
ID: 33466627
Are you looking for an AD command to see if the computer is or has been a part of the domain?  OR...  Can't you just ping the machine name if the server is on and DNS is working properly?

ping servername

C:\Documents and Settings\user>ping servernameisd102

Pinging servername.domain.com [ip address] with 32 bytes of data:

Reply from [ip address]: bytes=32 time<1ms TTL=128
Reply from [ip address]: bytes=32 time<1ms TTL=128
Reply from [ip address]: bytes=32 time<1ms TTL=128
Reply from [ip address]: bytes=32 time<1ms TTL=128

Ping statistics for [ip address]:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\user>
0
 
LVL 4

Expert Comment

by:trythisone
ID: 33466766
If you are looking to see if a computer is in a domain you could use:

NETDOM QUERY /D:MyDomain SERVER

or

To find Domain Controllers
DSQUERY Server -o rdn
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 4

Expert Comment

by:trythisone
ID: 33467044
If you just want to see if a workstation exists in Active Directory you can use:

dsquery computer -o rdn |sort

That will give you a list of all of the machines

If you are looknig for a specific computer you could use:

dsquery computer -o rdn |find "computer_name_that_you_want_to_find" /i

If it finds it, it will return the computers name.  You can also use just part of the computers name and it will list all computers that contain that phrase.

Example:
dsquery computer -o rdn |find "comp" /i
Could return:
"COMP1"
"COMPUTER"
"MY_COMPUTER"

0
 
LVL 6

Author Comment

by:anushahanna
ID: 33468787
>>to see if the computer is or has been a part of the domain

yes, that is what i need.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33468788
I tried "dsquery computer -o rdn |find "POSWR22" /i" and I got the foll:
Dsquery has reached the default limit of 100 results to display; use the -limit option to display more results.

then I tried "dsquery computer -o -limit rdn |find "POSWR22" /i"

I now get "dsquery failed:No value specified for `o'."
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33468797
When i did :
NETDOM QUERY /D:SRBSV POSWR22
where SRBSV is the domain name, and the server is POSWR22, I get the foll:

The syntax of this command is:
NETDOM [ ADD | COMPUTERNAME | HELP | JOIN | MOVE | QUERY | REMOVE | RENAME |
         RENAMECOMPUTER | RESET | TRUST | VERIFY | RESETPWD ]

Try "NETDOM HELP" for more information.

what did i have wrong there?
0
 
LVL 4

Accepted Solution

by:
trythisone earned 450 total points
ID: 33470782
try this instead:

dsquery computer -o rdn -limit 0 |find "POSWR22" /i
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33477292
helped. thank you.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

636 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