I want to move all the users in the local Administrators group (on each server in a list) into a security group that sits inside this local Administrators group.
I managed to create the AD security group (e.g <servername>_admins) and have this new group into each servers local administrators group. Now I want to move all the other remaining memebrs of this admin group into it.
How could this be scripted? ...prefereably in powershell.
Read all the direct members of "\\servername\local admins" into an array, add them into the new AD security group
remove them from the direct local admin group - unless it's the new admin group (servername_admin)