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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

From Command line - am I in domain or workgroup ? 2

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

How can I find from Command line - am I in domain or workgroup ?
I need some command to do the job,and not a GUI.
thanks

Long live king Moshiach !
 
There are probably better ways, but I suppose that you could compare computer name & domain. If they are the same, you're in workgroup; if different, your a domain member.
Code:
@echo off
if %computername%==%userdomain% (
echo This system is in workgroup
) else (
echo This system is a member of the domain %userdomain%
)
 
right click (my computer) go to properties click on computer name

this will give you everything you need domain /workgroup name and computer name


 
jimbuddy, how do you right-click on my computer from the command prompt?
 
how about: "gpresult" from dos prompt

any good

[cannon] [worm]
"Practice makes Perfect"
("la pratique rend parfait")
CPO rt'd RN

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top