Hello. I have a PowerShell script that runs locally on a machine performing several different actions. One of the actions is to add a specific computer account in Active Directory. For example, I have a computer called Desktop that is in the Lab domain. I would like to add a computer account called Server to the local administrator group on Desktop.
I have tried several different approaches without success. Could anyone offer advice?