Solved

servername in domain

Posted on 2010-08-18
9
452 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
  • 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
 
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Resolve DNS query failed errors for Exchange
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

863 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

22 Experts available now in Live!

Get 1:1 Help Now