Solved

Where can I download ADSI?

Posted on 2009-05-12
24
1,051 Views
Last Modified: 2013-11-05
Where can I download ADSI?
0
Comment
Question by:Abdu_Allah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 11
  • +1
24 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 24367635
are you talking about ADSIEdit?
http://support.microsoft.com/kb/892777
That is part of the support tools.
Another good tool for viewing objects is AD Explorer
http://technet.microsoft.com/en-us/sysinternals/bb963907.aspx
 
Thanks
Mike
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24367830
I'm talking about Active Directory Services Interface.
0
 
LVL 2

Expert Comment

by:iamshaked
ID: 24368064
http://technet.microsoft.com/en-us/library/cc749949.aspx

down at the bottom where it says
To Install ADSI
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 71

Expert Comment

by:Chris Dent
ID: 24368205

Why do you think you need to download ADSI? Because most systems have it installed. If you're doing a bit of scripting on a Windows machine you certainly don't need to download it.

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24368226
The download link does not work , it takes me to http://www.microsoft.com/windows/
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24368239
>If you're doing a bit of scripting on a Windows machine you certainly don't need to download it.

I'm doing a scripting on Vista where ADSI is not installed.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24368531

Yes it is. I use Vista here and can quite happily test code using ADSI.

Would you be able to share your code with us? Perhaps that might indicate why.

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24368827
What Vista you are using? I'm using Vista Home Premium.
The following is my code:

            Dim dso = GetObject("WinNT:")
            Dim lobjUser = dso.OpenDSObject("WinNT://" & domain, domainAndUsername, pwd, 1)
 
            'WScript.Echo(Err.Number)
 
            If Err.Number = 0 Then
                'WScript.Echo("Authenticated")
                If lobjUser.Homedirectory = "" Then
                    intErr = 2
                    'txtErr = "User does not have home directory, please contact your administrator."
                Else
                    _HomeDirectory = lobjUser.Homedirectory
                End If
            Else
                'Not authenticated
                intErr = 1
                Return False
                ' WScript.Echo("Not Authenticated")
            End If

Open in new window

0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24368889

Ultimate. You know you can't combine Dim and value assignment in a single statement in VbScript? You'll need a Set or two as well.

It would have to be something like the below, where : is just the equivalent of a line break.

What error are you getting returned if that's just a copy / paste based typo?

Chris
            Dim dso : Set dso = GetObject("WinNT:")
            Dim lobjUser : Set lobjUser = dso.OpenDSObject("WinNT://" & domain, domainAndUsername, pwd, 1)
 
            'WScript.Echo(Err.Number)
 
            If Err.Number = 0 Then
                'WScript.Echo("Authenticated")
                If lobjUser.Homedirectory = "" Then
                    intErr = 2
                    'txtErr = "User does not have home directory, please contact your administrator."
                Else
                    _HomeDirectory = lobjUser.Homedirectory
                End If
            Else
                'Not authenticated
                intErr = 1
                Return False
                ' WScript.Echo("Not Authenticated")
            End If

Open in new window

0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24368933
I'm getting error number -2147221005 , per this website http://www.stylusstudio.com/xsllist/200008/post31110.html
It means Invalid class string.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24368951

On what line? What's the Err.Description value?

Or just kill off any "On Error Resume Next" statements and let it drop the error to the console :)

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24368952
By the way this script is in .NET page so there is no place for "Set" command.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24368993

"_HomeDirectory"

_ is generally reserved, it allows a command to continue over a line. It cannot be used at the beginning of a variable name. That throws an error as well.

Chris
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24369173

I'm so confused now. You said "I'm doing a scripting".

VB .NET certainly can't be run as a client-side script, largely because it isn't a scripting language.

> this script is in .NET page

So is it a client-side script? Or something the server hosting the site is processing?

It's not JavaScript, so VbScript... Makes sense with all those WScript.Echo statements around the place.

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24372303
it's server side script, so what's the problem with it?!
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24372406

Okay, if I assume it's VB .NET (and not a script at all)...

What values are you passing for "domain"? And which line is producing the error message?

If the variable name is accurate it cannot have a homeDirectory property which would potentially cause an error.

Inclusion of WScript.Echo still confuses me, but there we go.

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24375284
>On what line? What's the Err.Description value?

Err.Description  is "Unspecified error "
on line # 1
 
Forget WScript as you can see it's comented out, this is result from copy/paste operation.
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24375299

Is line 1 this in yours?

Dim dso = GetObject("WinNT:")

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24375390
sorry the problem is on line # 2
Dim lobjUser = dso.OpenDSObject("WinNT://" & domain, domainAndUsername, pwd, 1)
 
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24375487

Hard-code values to check it works in principal.

e.g.

Dim lobjUser = dso.OpenDSObject("WinNT://yourdomain", "yourdomain\username", "password", 1)

You will get "Unspecified error" if the value for "yourdomain" is not correct.

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24403190
Ok I get rid from that error but why I got this error:
"Public member 'Homedirectory' on type '_ComObject' not found."
on line number 8 of your code!
0
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24403478

What are you passing for "domain"? That value can only exist on a user account.

Chris
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 24412063
>What are you passing for "domain"? That value can only exist on a user account
Not sure if I got your point but I the authentication was successfully done but the problem appear on line 8 of your code.
0
 
LVL 71

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 24412219

Sure, but you'll only be able to get that value if this is passed for "domain":

domain = "yourdomain/username"
Dim lobjUser = dso.OpenDSObject("WinNT://" & domain, domainAndUsername, pwd, 1)

If domain is just:

domain = "yourdomain"

Then it won't be able to return the HomeDirectory property, it doesn't exist on the domain object, only on the user account object.

The authentication stands separately from this, all that does is give you a connection to "domain" using the credentials supplied. It doesn't implicitly allow you to access anything belonging to domainAndUsername.

Chris
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ntp server 15 83
EXCHANGE, ACTIVE DIRECTORY, VMWARE 5 116
Domain Controller/ Old server 9 70
Writing reports to a script 7 27
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question