jpetter
asked on
How to detect the Workstation domain remotely
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!
I looked at it on a WinXP box, but I don't have an NT one to play with at present!
ASKER
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\Wi ndows 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
1. HKLM\Software\Microsoft\Wi
2. Resort to WMI...which I don't really want to do.
Jeff
ASKER
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|CurrentControl
Thanks,
Jeff