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

x
?
Solved

How to detect the Workstation domain remotely

Posted on 2004-08-19
4
Medium Priority
?
386 Views
Last Modified: 2010-04-14
We are in the process of migrating all of our users and computers from the old NT4 domain structures. I am in the process of writing a program to check for fallout. My program accepts a list of computer names as input, then remotely connects to each computer usisg RegConnectRegistry, and then I query different values to determine the success/failure of the migration of that particular machine, writing the results out to a log file.

I am having a tough time figuring out how to determine the Workstation domain (not the logon domain) remotely. Is there any identifier in the registry that I may have missed, or perhaps a command line utility? I have found that if I  run 'net.exe' with 'config workstation' I receive the info I need, but cannot run it against remote computers.

If anyone has any ideas I would greatly appreciate them. And, fwiw, we have a mix of Windows OS's, but I am primarily concerned with NT4, 2K, and XP.

Thanks,
Jeff
0
Comment
Question by:jpetter
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
scampgb earned 2000 total points
ID: 11840709
Hi jpetter,

I think that the registry key you're looking for is MachineDomain in HKLM\SOFTWARE\Microsoft\MSMQ\Parameters\Setup

You can find out more at http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/reskit/en-us/regentry/91598.asp - but is sounds exactly like what you're looking for.

I hope that this helps.
0
 

Author Comment

by:jpetter
ID: 11841572
scampgb,

That's the key I had been checking, but I thought I read an article stating it wasn't present on all builds. I've dug through my history files and naturally I cannot find it. Also, that key isn't present on NT4 systems, but I think I can use HKLM\System|CurrentControlSet\Services\Private\NetLogon and read the 'NetbiosDomainName' value name.

Thanks,
Jeff
0
 
LVL 15

Expert Comment

by:scampgb
ID: 11842437
Hi.  Thanks for the "A".  Glad I could help.
I looked at it on a WinXP box, but I don't have an NT one to play with at present!
0
 

Author Comment

by:jpetter
ID: 11843160
No problem. Interestingly enough, or should I say frustratingly enough, I have found Win2K machines that do not have that key. It looks like I may have two choices.
1. HKLM\Software\Microsoft\Windows NT\CurrentVersion and grab the CachePrimaryDomain value, though I don't know how reliable that is.
2. Resort to WMI...which I don't really want to do.

Jeff
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Following on from our article on "The Murky World of Consent and opt in", we thought we would issue some helpful guidance, not only on consent itself but knowing what information you are capturing, what you are doing with this data and how you can p…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

927 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