You'd benefit from the Quest AD CmdLets a lot for this:
http://www.quest.com/powershell/activeroles-server.aspxThen your script goes something like this.
If it must be native PowerShell, no snap-ins, then that's also possible, however, this is the easiest method.
Chris