Matt,
Just wanted to mention that it was a quick one that i posted.
But you should note that It does not take care of orgs within orgs. And so It also does not take care of same org name appearing at multiple level.
The below should take care of displaying Orgs from all levels.. But Get-Unique will eliminate multiple entries of the same name, even when they are at different Org levels.
$orgNameList = $org | Get-UcsOrg -Hierarchy | % {$a = $_.Rn; if(::IsMatch($a,"org-*")){ $a }} | Get-Unique
Thanks,
Vijay Vikrant Balyan
Fortunately, although my environment is large, it is not very complex. There are only a few sub-orgs off of the root (so far) so this script is more than sufficient. I did modify it a little to improve usability.