adding a domain group to local admin group on selected machines via script

adding a domain group to local admin group on selected  machines via script

I have used this for a machine locally....

net localgroup administrators domain\group /add

How do i add remote machine ....example

net ....remotemachine localgroup.......etc

Thanks
chowdriAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Shift-3Connect With a Mentor Commented:
One way to do this is with PsExec, e.g.
psexec \\remotemachine net localgroup domain\group /add

But in the long term it is usually better to use the Restricted Groups feature in Group Policy.
0
All Courses

From novice to tech pro — start learning today.