powershell add user to local admin group on remote computer code example
Example: powershell add user to remote desktop group
Add-LocalGroupMember -Group "Remote Desktop Users" -Member "UserName"
Add-LocalGroupMember -Group "Remote Desktop Users" -Member "UserName"