Re: Win32::OLE with Active directory question

2003-01-06 Thread Joe Richards
This is completely a non-perl response and a non-adsi response which is
where the issue is for this question but once I saw the recommendations of
ADSIEdit and LDP I had to put in a command line tool recommendation
especially since it is one I wrote. :op  Check out adfind which you can get
on the free win32 tools page of www.joeware.net; I actually script around it
with Perl on a nearly daily basis. It does command line LDAP Searches
against AD and since it uses LDAP instead of ADSI I am able to easily get
all attributes for an object. It will decode several of the main attributes
that are binary (Octet Strings) such as SID's, GUID's, etc.

You can also/alternatively look at ldapsearch from the iPlanet SDK which has
a little trouble with AD sometimes and you can also look at search.vbs which
is in the support tools of Windows 2000 but again that uses ADSI and you
need to specify specific attributes to return.

The answer to your question is the answer to the question How do you
enumerate all attributes for an instantiated object with an ADSI LDAP
query? and I don't think I have ever seen that but it definitely doesn't
mean it isn't possible or doesn't exist. I know you can query the Schema and
find out all properties that are possible but in most implementations you
will find tens if not hundreds of attributes that aren't used on a majority
of the objects.

  joe

--
- Original Message -
From: Sean Johnson [EMAIL PROTECTED]
To: Norris, Joseph [EMAIL PROTECTED]; Perl Win32 Users (E-mail)
[EMAIL PROTECTED]
Sent: Monday, January 06, 2003 8:34 AM
Subject: RE: Win32::OLE with Active directory question


You might want to look at the object through ADSIEdit and LDP ... I've
used both many times when I'm trying to figure out what attributes are
available, etc.

Sean

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Win32::OLE with Active directory question

2003-01-03 Thread Norris, Joseph
Everyone,


I have the following code:

$path = WinNT:// . Win32::DomainName();
if ( $AD = Win32::OLE-GetObject( $path ) ){;
my $Schema = Win32::OLE-GetObject( $AD-{Schema} );
if( $Schema-{Container} ) {
$AD-{Filter} = f=user;
my $Object;
foreach $Object ( in( $AD ) ) {
if ($Object-{Name} eq $user_name){
$cnt++;
print name: $Object-{FullName}\n;

}
last if ($cnt);
}


I have figured out how to 'Name' and FullName - just by hacking around - is
there any way to get a complete list
of what $Object is pointing at?

I have tried to take it apart as hash ref but have not found any thing. What
I have tried:


foreach my $key (keys %{$Object}){
print key - $key\n;
}

This has not produced a thing.  Please advise - thanks.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs