I have been using the PowerGUI Script Editor, version 1.5.2.550, from our partners at Quest Software (download it here).

It gives me nice syntax highlighting, and a big button to run the script, just like in Visual Studio.  Quest offers a number of special cmdlets for ADSI, but I haven't tried any of those. 

One of the nice things about PowerShell is that it offers lots of ways to do things.  For example, if you are trying to count occurences of some structures using Perl, you certainly can use regular expressions.  However, if you grew up thinking in terms of how the DOS matching engine works, you can do a lot (though not everything) with simpler patterns.  Consider this little script:

Set-Location C:\Users\me\Desktop\test

foreach ($log in Get-ChildItem -literalPath C:\Users\me\Desktop\test){

$pusg=$pgsg=$plsq=$husg=$hgsg=$hlsg=$wkn=0

switch -wildcard -file $log {

"*Primary SID*Universal Security Group*" {$pusg++}

"*Primary SID*Global Security Group*" {$pgsg++}

"*Primary SID*Local Security Group*" {$plsg++}

"*SID History SID*Universal Security Group*" {$husg++}

"*SID History SID*Global Security Group*" {$hgsg++}

"*SID History SID*Local Security Group*" {$hlsg++}

"*WellKnown*" {$wkn++}}

write-output "$pusg $pgsg $plsq $husg $hgsg $hlsg $wkn"

}

The Desktop\test directory contained a bunch of output files from ntdsutil, created with that utilities own language and batch files.  Now, rather than rewriting the wheel to get to that point, start from what you have (a bunch of files) and read those files in order to get the statistics you need for estimating problems in domain migration.  The script above produces one row per file, counting the entries in the output that match certain criteria. 

If a line in the input file contains the words "WellKnown", for example, increment the $wkn variable by one -- and that total will be in the 7th value from the left in the output row for that input file.

I've seen some terrible and unmaintainable tools for doing this sort of meta-log processing, particularly in certain industries, and you can't beat being able to quickly modify a rule in the GUI, and generate your statistics.  Plus, you have certain guarantees from theoretical computer science about the run times of routines coded in this fashion.