Windows PowerShell and Active Directory

As Windows PowerShell: TFM comes closer to completion, one of the last things I’ve been working on, with my co-author Jeffery Hicks,is the big chapter of “how to do different stuff in PowerShell.” This is when it really struck me how little direct support PowerShell has for Active Directory / ADSI; I’m informed by team members from Microsoft that it just came down to a decision to ship, rather than to continue developing, and that ADSI support will be forthcoming. But I think this is going to be a major weak point.

Certainly, you can get at the .NET Framework DirectoryServices classes and manipulate the directory that way, and you can use WMI to perform basic queries against both AD and local accounts. So all is not lost, although using the .NET classes is, I think, further into hardcore programming than most Windows administrators really have time to venture.

So I guess we’ll see what happens. I think PowerShell’s biggest initial audience is going to be hardcore VBScript folks who adopt PowerShell early on (it is easier to do a lot of stuff – I did an example where a 30-line VBScript turned into a 4-line PowerShell script). However, the lack of direct and simple ADSI support is going to make those folks stick with VBScript for their directory management tasks, and if they have to stick with VBScript… why bother with PowerShell at all? At least, that’s my fear; I do hope it doesn’t turn out to be true.

Back to writing – just a couple chapters left to get the first draft done on, and then it’s off to tech edit, copy edit, indexing and, yes… printing!

Technorati Tags: