How to copy AD Members from one group to another group

If you have an AD group full of members, and you want to copy that memberlist over to another group, then it can be done with this powershell scipt:

From: put in the AD group where you want to copy users from.

TO: put in the AD group name where you want the users to be copied to.

Get-ADGroupMember “FROM” | get-aduser | foreach-object {add-adgroupmember -identity “TO” -Members $_.SamAccountname}

Thats it.