Solved

How to detect the Workstation domain remotely

Posted on 2004-08-19
4
347 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 500 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

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…
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

791 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