Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy question...Is the server on the domain or not...?

Status
Not open for further replies.

matrix101

MIS
Jun 5, 2007
60
US
Hey guys,

I have a question. How can I tell if a server is in the domain or not?

1. From what I know you can tell if a server is on the domain by looking at the computer properties and noting whether it's in a workgroup or domain.

2. Also from logging in, you would have the option to log into the domain or "this computer"

3. nslookup???not sure if this would tell you anything. I think you can have a computer not on the domain but still have a host "A" record, please correct me if I'm wrong.

Is there any other way to tell????

Thanks!


 
go into the computer properties... click "Computer name" and it will say under the computer name if it is on a domain and the name of the domain
 
Thx wwarsin - I have that soltion already listed under #1 on my list. I was actaully looking for other ways of confirming a server is part of a domain.

thx.
 
What problem exactly are you trying to resolve?

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.
 
Hi Davetoo, no prob here (for now) just doing a little research. I thought there would be a way to tell whether a server was in the domain through DNS somehow...? thx.
 
You could run a command "ipconfig /all" that will help. Other commands can give you this information as well:

dsquery (will query the domain controller)
gpresult (will tell you what group policies are applied (to include domain policies))
systeminfo (pretty much does what it says)
whoami (returns domain name, computer name, and other info)

The vbscript looks like this:

Code:
On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_NTDomain")

For Each objItem in colItems
    Wscript.Echo "Client Site Name: " & objItem.ClientSiteName
    Wscript.Echo "DC Site Name: " & objItem.DcSiteName
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "DNS Forest Name: " & objItem.DnsForestName
    Wscript.Echo "Domain Controller Address: " & _
        objItem.DomainControllerAddress
    Wscript.Echo "Domain Controller Address Type: " & _
        objItem.DomainControllerAddressType
    Wscript.Echo "Domain Controller Name: " & objItem.DomainControllerName
    Wscript.Echo "Domain GUID: " & objItem.DomainGuid
    Wscript.Echo "Domain Name: " & objItem.DomainName
    Wscript.Echo "DS Directory Service Flag: " & objItem.DSDirectoryServiceFlag
    Wscript.Echo "DS DNS Controller Flag: " & objItem.DSDnsControllerFlag
    Wscript.Echo "DS DNS Domain Flag: " & objItem.DSDnsDomainFlag
    Wscript.Echo "DS DNS Forest Flag: " & objItem.DSDnsForestFlag
    Wscript.Echo "DS Global Catalog Flag: " & objItem.DSGlobalCatalogFlag
    Wscript.Echo "DS Kerberos Distribution Center Flag: " & _
        objItem.DSKerberosDistributionCenterFlag
    Wscript.Echo "DS Primary Domain Controller Flag: " & _
        objItem.DSPrimaryDomainControllerFlag
    Wscript.Echo "DS Time Service Flag: " & objItem.DSTimeServiceFlag
    Wscript.Echo "DS Writable Flag: " & objItem.DSWritableFlag
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Primary Owner Contact: " & objItem.PrimaryOwnerContact
    Wscript.Echo
Next

As always, play around with the commands with caution!
 
You can try this:

Go to cmd prompt and do a net bios table statistic command on a particular IP address or host name.

Here is the command:

nbtstat -A xxx.xxx.xxx.xxx

or

nbtstat -a PCNAME

or see the results of my query below


***********************************************

U:\>nbtstat 10.0.25.73

Displays protocol statistics and current TCP/IP connections using NBT
(NetBIOS over TCP/IP).

NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n]
[-r] [-R] [-RR] [-s] [-S] [interval] ]

-a (adapter status) Lists the remote machine's name table given its name
-A (Adapter status) Lists the remote machine's name table given its
IP address.
-c (cache) Lists NBT's cache of remote [machine] names and their IP
addresses
-n (names) Lists local NetBIOS names.
-r (resolved) Lists names resolved by broadcast and via WINS
-R (Reload) Purges and reloads the remote cache name table
-S (Sessions) Lists sessions table with the destination IP addresses
-s (sessions) Lists sessions table converting destination IP
addresses to computer NETBIOS names.
-RR (ReleaseRefresh) Sends Name Release packets to WINS and then, starts Refr
esh

RemoteName Remote host machine name.
IP address Dotted decimal representation of the IP address.
interval Redisplays selected statistics, pausing interval seconds
between each display. Press Ctrl+C to stop redisplaying
statistics.


U:\>nbtstat -a 10.0.25.73

Local Area Connection 1:
Node IpAddress: [10.0.25.73] Scope Id: []

NetBIOS Remote Machine Name Table

Name Type Status
---------------------------------------------
ALB-HCLRP51-DSK<00> UNIQUE Registered
CHARLESTOWN <00> GROUP Registered
ALB-HCLRP51-DSK<20> UNIQUE Registered
CHARLESTOWN <1E> GROUP Registered
CHARLESTOWN <1D> UNIQUE Registered
..__MSBROWSE__.<01> GROUP Registered

MAC Address = 00-0F-1F-4D-3C-FD


Any entries with Group will indicate your domain, otherwise it will appear as workgroup.


Hope this helps ya!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top