WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: Beat on May 19, 2018, 11:32:12 AM

Title: How to get informations from a Windows-System
Post by: Beat on May 19, 2018, 11:32:12 AM
Hello all together,
First of all I'm sorry for my bad English.
At the moment I try to collect many information about some system in our network, which are not or maybe not in our Domain.
No problem to get info like ComputerName and WindowsVerion ect.

But I don't find a sexy way to get DomainName or WorkgroupName with a WinBatch function.

Of course it possible to use the environment "USERDOMAIN" but I don't know how it work if the computer is not in a domain.
Thaks for help
Beat
Title: Re: How to get informations from a Windows-System
Post by: td on May 21, 2018, 07:28:33 AM
There are a few caveats but take a look at the following brief article:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+Determine~if~Computer~is~in~a~Workgroup~or~Domain.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+Determine~if~Computer~is~in~a~Workgroup~or~Domain.txt)

For what it is worth, "USERDOMAIN" is normally set to the computer's name on Workgroup computers.