As Active Directory management from PowerShell is very important to me in my daily work as I do all AD, SMS and MOM management from PowerShell as well as some of the others in my department allready ;-) ,
As you could see here : PowerShell RC2 and Active Directory I do not like the Wapper added in RC2.
I have a lot if discussions about it ,
in the NewsGroup (Yes Finaly Google has Indexed the PowerShell NG )
Syntax ([ADSI] removed by google)
getting COM properties . ([ADSI] removed by google)
and on IRC , there I got this remark :,
<dreeschkind> guys, you need to vote if you want to achieve anything
And ofcourse did add a 5 ;-)
In the Newsgroup Threads Aruk Kumaravel explains a bit more about the wrapper and about the methods added (hidden),
and he has also some examples on his blog using the new wrapper :
Most people I did hear so far that are using PoSH for AD do not like it, and the questions on the NGm
also ofcourse I did,some more comparing and testing also, here you see some examples of the differences added by the wrapper :
Note that PsBase has no Tabcompletion.
# New (not working )
# Old way ( works ) :
as you could see here : PowerShell and Active Directory Part 3 (UserProperties) , (last part of post) the ADSI COM Object has some added Method Properties, for a list see : Interface Property Methods. on MSDN
I do not know how to do it yet using the wrapper, (see last NG thread [ADSI] getting COM properties . )
PS C:\PowerShell> ([adsi]'LDAP://CN=FooMoved,DC=mow,DC=local').'AccountDisabled'
PS C:\PowerShell> ([adsi]'LDAP://CN=FooMoved,DC=mow,DC=local').get('AccountDisabled')
Exception calling "get" with "1" argument(s): "The directory property cannot be found in the cache.
At line:1 char:49
+ ([adsi]'LDAP://CN=FooMoved,DC=mow,DC=local').get( <<<< 'AccountDisabled')
PS C:\PowerShell> # Old way (works):
PS C:\PowerShell> ([adsi]'LDAP://CN=FooMoved,DC=mow,DC=local').psbase.invokeget('AccountDisabled')
As I have almost 1500 readers of the first post of the series PowerShel and Active Directory Part 1 , and 626 that came to PowerShell and Active Directory Part 3 (UserProperties) , so if you have done that start (and did read the NG threads), you have experince with the process and can give valuable feedback,
Do you think is more easy to get started with Active Directory in PowerShell in RC1 or RC2 ?
As that was the main goal of this change I think.
or join the discussion in the microsoft.public.windows.powershell NewsGroup
Let know what you think !,
(OK sorry one more complaint ;-) )
I still think that for this little value that.emulating VbScript this wrapper does add for someone starting with PowerShell (when he is coming from VbScript, and knowing all the Methods by Head ;-) ) ,
This wrapper does to much concessions to the usability of PowerShell for more advanced administrator tasks, for using /converting all examples in other .NET languages (C#,IronPyhon,VB.NET,PowerShell), Developers to use PowerShell as a Tool , or to glide to a making a CmdLet , and it is very confusing, making exploring and Learning harder.
I think the way forward, using the Framework, is the best way , see also all changes in .NET2.0 for managing AD infrastructure : /\/\o\/\/ PowerShelled: AD Infrastructure exploring with MSH (AD is managed by admin's, not by end-users ) , as you could see in the Part 3of the series, and the example in this post, it is already easy enough to get to those Hidden Methods added by the wrapper, and we have best of both worlds.
Also Get-Member is one of the most used and important commands in PowerShell , and in exploring Objects , and we have to be able to trust it to be consistent and complete, as it is one of our eyes into the PowerShell World.
So I think that hiding important information from it, for some also hidden added methods is the wrong way to go on the glidepath, and I see almost nothing for it in return, as for typing PSBase.
End of campain !