As Technet Gallery is retiring so moving the code to Git Hub. (click below github download link for this script)
Add User to Local Administrator on Remote Machine
Sharing with you the nice little powershell program that you can use to remotely add user to local administrator group on
remote server.
Download the zip, extract it –> run the batch file & add parameters
Tech Wizard