All you need is following one-liner:
([ADSI]"WinNT://localhost/administrators,group").psbase.Invoke("Add",([ADSI]"WinNT://domain/user").path)
You need to change the domain/user to your actual domain name and user name (contoso/john for example).
No comments:
Post a Comment