I think exists() is probably the only static method of any use, but you can
use get-member:
[adsi] | get-member -static
And for instance members:
$user = [adsi]"LDAP://CN=Joe User,OU=HisOU,DC=Domain,DC=World"
$user | get-member
The above will give you an adapted view, to view the raw object:
$user.psbase | get-member
This may be of some help:
http://blogs.technet.com/benp/archiv...owershell.aspx
The quest cmdlets are alot easier to work with and will save you some time
if you have the option to use them.
"Tim Munro" wrote:
> Thanks for trying Mike. I like the [adsi]::Exists though. How can I find out
> what other methods are available through the [adsi] provider?
>
> "Mike Pfeiffer" <MikePfeiffer@xxxxxx> wrote in message
> news:AB62A9AE-7A39-4311-BAC9-2D6BC710C69D@xxxxxx
> > nevermind, I just realized you were asking about the attribute and not the
> > object itself...guess I should slow down and read the entire thing next
> > time
> > 
> >
> > "Mike Pfeiffer" wrote:
> >
> >> Try:
> >>
> >> [adsi]::Exists("LDAP://CN=Joe User,OU=HisOU,DC=Domain,DC=World")
> >>
> >> "Tim Munro" wrote:
> >>
> >> > hi all,
> >> > I'm trying to find how to determine if a property or attribute
> >> > exists in
> >> > an AD object. Specifically the accountexpirationdate. If I just look
> >> > for and
> >> > it's not there, and exception is thrown.
> >> >
> >> > Quick example:
> >> >
> >> > $oUser = [adsi] "LDAP://CN=Joe User,OU=HisOU,DC=Domain,DC=World"
> >> > If ($oUser.ifAttributeexists($myAttribute)) {
> >> > do stuff
> >> > }
> >> >
> >> > Is there a way to accomplish this?
> >> >
> >> > Thanks.
> >> > --
> >> > Tim.
> >> >
> >> >
> >> >
> >> >
> >> > >
>
>