As to the first question:
Dim objWSHNetwork
Set
objWSHNetwork = CreateObject ("WScript.Network")
' get the NetBIOS domain name strNetBIOSDomain = objWSHNetwork.UserDomain Set objWSHNetwork = Nothing As to
the second question, see
and
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SysPro Support Sent: Sunday, August 21, 2005 1:54 AM To: ActiveDir@mail.activedir.org Subject: [ActiveDir] Getting the Pre Windows 2000 name for a domain Hi,
I have a requirement to determine the machines
that are currently online for a particular domain. I use the Net View
command and give it a domain name such as:
Net View /Domain:DomName
Since I know the Fully qualified Domain
name AAA.BBB.CCC then I use:-
Net View /Domain:AAA
and it normally works. However I have one client
that uses a different Pre Windows 2000 name (don't ask me why). I tried the
following bit of code to try and programmatically work out the Pre Windows 2000
name:-
Dim Sdou As
IADs
Dim PropertyValue As Variant Set Sdou = GetObject("LDAP://DC=AAA,DC=BBB,DC=CCC") For Each PropertyValue In Sdou.GetEx("Name") If PropertyValue <> "" Then MsgBox PropertyValue End If Next but it just returned AAA.
So, is there a property in Active Directory that
returns the Pre Windows 2000 name?
Alternatively, is there anyway to determine the
machines that are online via AD, rather than via the Net View
command?
Alan Cuthbertson
|
Title: RE: [ActiveDir] OT:Exchange 2003 SP1 bloat
- RE: [ActiveDir] Getting the Pre Windows 2000 name for a d... Michael B. Smith