PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Figure out domain of system?
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Figure out domain of system?
![]() |
Figure out domain of system? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Is there any quick way to get the NT Domain of a system that is in a domain?
I already found the computer name in my.computer.name but dont see a quick solution to the domain... anyone know of one? thanks! |
|
|
|
#2 |
|
Guest
Posts: n/a
|
On Wed, 14 Mar 2007 08:47:51 -0400, "Smokey Grindel" <nospam@nospam.com> wrote:
¤ Is there any quick way to get the NT Domain of a system that is in a domain? ¤ I already found the computer name in my.computer.name but dont see a quick ¤ solution to the domain... anyone know of one? thanks! Don't know which format you're looking for but the following (which uses ADSI) is probably the easiest method: Dim SystemInfo As Object SystemInfo = CreateObject("ADSystemInfo") Console.WriteLine(SystemInfo.DomainShortName) Console.WriteLine(SystemInfo.ForestDNSName) Paul ~~~~ Microsoft MVP (Visual Basic) |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

