Re: how to determine if a w2k machine is part of a domain



Hi,

I guess you could ues IsMember9.vbs to check if the group "Domain Admins" is
a member of the local Administrators group. By default, this group is added
to the local Administrators group when the computer joins the domain, but it
can be changed. Also, the Administrators group can be renamed.

A better approach would be to attempt to bind to the RootDSE object and trap
the error if this fails.

On Error Resume Next
Set objRootDSE = GetObject("LDAP://RootDSE";)
If (Err.Number <> 0) Then
Wscript.Echo "Active Directory domain not found"
Wscript.Quit
End If
On Error GoTo 0
strDNSDomain = objRootDSE.Get("defaultNamingContext")

However, the error is raised if a Domain Controller cannot be contacted
(perhaps the network cable is disconnected), even if the machine has been
joined to the domain. This may still suit your needs.

Otherwise, you might look for a registry setting. Perhaps

HKLM\Software\Microsoft\Ads\Providers\LDAP

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"Christoph Dommermuth" <christoph.dommermuth@xxxxxxxx> wrote in message
news:uNVeHgpeGHA.4912@xxxxxxxxxxxxxxxxxxxxxxx
Hi OM,

I've found this: http://www.rlmueller.net/Programs/IsMember9.txt

Hope this will help you.

Chris

"OM" <om@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:u8$$LNpeGHA.1812@xxxxxxxxxxxxxxxxxxxxxxx
Thanks




.



Relevant Pages

  • Re: Listing user privileges
    ... So the service works is Domain Admin, running on a member, ... Domain Admins group resolves the issue, and I'm suspecting (but not yet ... confirmed) that being a member of the Administrators group for the domain ... are the privilege differences between those two groups, ...
    (microsoft.public.windows.server.security)
  • Re: Listing user privileges
    ... that Domain Admins (therefore AD controller ... Administrators group) has no advanced privileges on a member server other ...
    (microsoft.public.windows.server.security)
  • Re: Listing user privileges
    ... Administrators group of domain is used only on the DCs. ... Domain Admins is member in Administrators group of each ... Administrators group) has no advanced privileges on a member server other ...
    (microsoft.public.windows.server.security)
  • Re: Listing user privileges
    ... Currently I have discovered that the service user being a member of the ... Domain Admins group resolves the issue, and I'm suspecting (but not yet ... Administrators group for the machine, so my task will be to identify what ... are the privilege differences between those two groups, ...
    (microsoft.public.windows.server.security)
  • Re: Admin cant change time?
    ... The administrators group has no permissions or rights over the laptop by ... The Domain Admins group is automatically added to the local administrators ... group of any domain member when that machine is joined to the domain. ...
    (microsoft.public.windows.server.active_directory)

Quantcast