Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

servername in domain

Posted on 2010-08-18
9
Medium Priority
?
461 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 200 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
New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

 
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 1800 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

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

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

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
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…
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 …

824 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