Solved

servername in domain

Posted on 2010-08-18
9
451 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
 
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

Join & Write a Comment

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…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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 configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

746 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

11 Experts available now in Live!

Get 1:1 Help Now