Solved

servername in domain

Posted on 2010-08-18
9
455 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

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.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
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…

738 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