Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

ADSI Documentation?

Closed Thread
 
Thread Tools Display Modes
Old 10-08-2006   #1 (permalink)
Jim Holbach
Guest


 

ADSI Documentation?

Is there any documentation for use of [ADSI] objects in RC2. I'm trying to
use the new methods and properties, but I'm a bit confused about how to know
what's in the cache, and how to deal with properties like pwdLastSet.

Thanks.

---
Jim Holbach
Old 10-11-2006   #2 (permalink)
Alex K. Angelopoulos [MVP]
Guest


 

Re: ADSI Documentation?

The [ADSI] type is just the .NET System.DirectoryServices.DirectoryEntry.
BTW, you can get the real type from any specific PS shortcut like this:

[adsi] | select fullname

This means the questions you are asking are actually
..NET-ADSI-implementation questions. If you think this is an abysmal answer -
you're right! It should get things going in the right direction, though,
because there is a LOT of hard-won knowledge about ADSI interaction here and
also in the ADSI programming newsgroups. Until a provider and custom cmdlets
become available, this is going to be a rough problem domain, just as it is
in WSH.

"Jim Holbach" <JimHolbach@discussions.microsoft.com> wrote in message
news:02985EA0-381F-4AE7-8259-C88411E16665@microsoft.com...
> Is there any documentation for use of [ADSI] objects in RC2. I'm trying to
> use the new methods and properties, but I'm a bit confused about how to
> know
> what's in the cache, and how to deal with properties like pwdLastSet.
>
> Thanks.
>
> ---
> Jim Holbach



Old 10-15-2006   #3 (permalink)
Jim Holbach
Guest


 

Re: ADSI Documentation?

Thanks, Alex. I probably just wasn't clear enough in my question. I'm
familiar with the DirectoryEntry class. But I'm still adjusting to the type
adapter introduced by RC2, and the entire shift to a get/set/put model like
in WSH. Having scripted with ADSI in WSH, I'm finding some slight differences
(at least in my understanding) of what worked in WSH and what works in PoSH.
For example, how do I get at the pwdLastSet attribute? Why doesn't the
set_Password method seem to work?

I'm a big believer in RTFM, I'm just having a hard time finding TFM. :-)

"Alex K. Angelopoulos [MVP]" wrote:

> The [ADSI] type is just the .NET System.DirectoryServices.DirectoryEntry.
> BTW, you can get the real type from any specific PS shortcut like this:
>
> [adsi] | select fullname
>
> This means the questions you are asking are actually
> ..NET-ADSI-implementation questions. If you think this is an abysmal answer -
> you're right! It should get things going in the right direction, though,
> because there is a LOT of hard-won knowledge about ADSI interaction here and
> also in the ADSI programming newsgroups. Until a provider and custom cmdlets
> become available, this is going to be a rough problem domain, just as it is
> in WSH.
>
> "Jim Holbach" <JimHolbach@discussions.microsoft.com> wrote in message
> news:02985EA0-381F-4AE7-8259-C88411E16665@microsoft.com...
> > Is there any documentation for use of [ADSI] objects in RC2. I'm trying to
> > use the new methods and properties, but I'm a bit confused about how to
> > know
> > what's in the cache, and how to deal with properties like pwdLastSet.
> >
> > Thanks.
> >
> > ---
> > Jim Holbach

>
>
>

Old 10-15-2006   #4 (permalink)
Alex K. Angelopoulos [MVP]
Guest


 

Re: ADSI Documentation?

"Jim Holbach" <JimHolbach@discussions.microsoft.com> wrote in message
news:EEFB62F2-70EC-4B2A-99B8-43B191CB2639@microsoft.com...
> Thanks, Alex. I probably just wasn't clear enough in my question. I'm
> familiar with the DirectoryEntry class.

In that case you may know _much_ more about this than I do - I gave this up
as a bad job and have been making do with WMI techniques for most account
manipulation.

> ... Having scripted with ADSI in WSH, I'm finding some slight differences
> (at least in my understanding) of what worked in WSH and what works in
> PoSH.


I've found a lot. My other approach has been to simply stick with
well-written WSH scripts and invoke them from PowerShell.

> For example, how do I get at the pwdLastSet attribute? Why doesn't the
> set_Password method seem to work?


Mark's blog is probably the single most important current reference on
ADSI-from-PowerShell. The overall page with his discussions of property
access (including pwdLastSet) is here:
http://mow001.blogspot.com/2006/08/p...ry-part-8.html

> I'm a big believer in RTFM, I'm just having a hard time finding TFM. :-)


I don't think it's been written yet.


Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADSI & Excel jmuirh PowerShell 4 02-12-2008 02:06 PM
Is ADSI encrypted? jer PowerShell 3 01-18-2008 07:39 AM
Frustrating ADSI Stephan Winkler PowerShell 9 02-12-2007 09:07 AM
Trapping and ADSI? Dan Metzler PowerShell 19 10-09-2006 01:12 PM
[ADSI] getting COM properties . /\\/\\o\\/\\/ [MVP] PowerShell 0 09-29-2006 11:36 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50