Jump to content
Sign in to follow this  
jfpricejr

Computer Domain

Recommended Posts

jfpricejr

Searching hasn't found anything very reliable so far. Anyone have or know of a script/util/tool which will reliably return the domain in which a Windows computer is currently a member. @LogonDomain works fine for the user but I need the computer domain. Thank you.

Share this post


Link to post
Share on other sites
November

Searching hasn't found anything very reliable so far. Anyone have or know of a script/util/tool which will reliably return the domain in which a Windows computer is currently a member. @LogonDomain works fine for the user but I need the computer domain. Thank you.

Hi there.

In DOS console you can run "nbtstat -a computername" , search for 1E result.

Cheers


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites
Valiante

Sorry for dragging up such an old thread, but that didn't answer the question. It's unclean and when running as a user other than the logged in user, you can't use nbtstat. Here's some very simple AutoIt code which will return the Computer domain (not user);

$objSystemInfo = ObjCreate("ADSystemInfo")
$domain = $objSystemInfo.DomainShortName
MsgBox(0, "Domain", $domain)
Edited by Valiante

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×