Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADSI Pathname Issue

Status
Not open for further replies.

ADutton

Programmer
Apr 10, 2003
2
US
Thanks in advance for any advice that can be given.

I've had this script working for a number of days to display all of the groups available in our domain server.
-------------------------------

Set Computer = GetObject("WinNT://" & strDomain)
Computer.Filter = Array("Group")

For Each Group in Computer
Response.Write &quot; - &quot; & Group.Name & &quot;<BR>&quot;
Next

-----------------
This was working beautifully until the other day when we had to change a number of security settings on the domain server for an unrelated issue. Now, the same scripts returns no groups or users - only 'Schema' - though going through Active Directory shows them to be there.

I also get an Invalid Pathname (80005000) error if I try to specifically find a user when I know their path. While it seems likely that it is a security issue, I can't figure out what exactly is the source or how to fix it.

The pathname is correct, the script hasn't changed. Thanks for taking your time.
 
Hey, not sure if this will help but i have written quite a few adsi scripts and found the LDAP namespace to be the answer for me..
i.e.

Set Computer = GetObject(&quot;LDAP://dc=DOMAIN,dc=SITE,dc=com&quot;)
Computer.Filter = Array(&quot;Group&quot;)

' Domain refers to the domain of your company
' Site refers to your company website name

For Each Group in Computer
Response.Write &quot; - &quot; & Group.Name & &quot;<BR>&quot;
Next

Anyways, this ended up working for me, hopefully it will do the trick

- Eric
 

Thanks for the advice. I'm not sure why, but I've been preferring the ADSI over LDAP. It seems like I'll be favoring LDAP now.

Thanks, again.
 
ADutton:

Sorry about taking so long to follow up but I'm wrapping up my senior year of school and between school & work i've been quite busy. Anyways, I didn't find MSDN to be a very helpful resource-surprise, surprise. However, Technet has a really nice scripting center which I highly recomend...

Take care
~Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top