Export and Import AD Groups

Get Group from AD
Get-QADGroupMember oldMoep\WRF-universal | select ntaccountname > C:\ad\WRF-universal.txt

Remove spaces
get-Content .\WRF-universal.txt | Foreach {$_.TrimEnd()} | Set-Content .\WRF-universal1.txt
Import TXT into AD Groups
Get-Content .\WRF-universal1.txt | Add-QADGroupMember -identity Moep\WRF-universal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s