PowerShell Script to add a account to all systems local user group.

Hello,

I need a script that will add "Test" to the local users group to all workstations in a Domain. Can only help?

Thanks 

May 20th, 2015 3:58pm

Not sure how you'd do it via PowerShell to be honest, but if you're in a domain environment have you thought of simply doing via Group Policy using Restricted Groups? See this thread which discusses it https://social.technet.microsoft.com/Forums/windowsserver/en-US/dcc1c4bc-dd43-4f90-94a4-38f0719b25f5/steps-to-assign-user-with-local-administrator-rights-in-windows-server-2008-r2?forum=winservergen

That's probably the easiest and most appropriate tool for the job (in a don't re-invest the wheel kind of way), but I apologise if you'd thought of that and had a specific reason to do it via PS.

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 4:34pm

Start here: https://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=localaccount&f%5B0%5D.Text=Local%20Account%20Management

May 20th, 2015 6:49pm

Not sure how you'd do it via PowerShell to be honest, but if you're in a domain environment have you thought of simply doing via Group Policy using Restricted Groups? See this thread which discusses it https://social.technet.microsoft.com/Forums/windowsserver/en-US/dcc1c4bc-dd43-4f90-94a4-38f0719b25f5/steps-to-assign-user-with-local-administrator-rights-in-windows-server-2008-r2?forum=winservergen

That's probably the easiest and most appropriate tool for the job (in a don't re-invest the wheel kind of way), but I apologise if you'd thought of that and had a specific reason to do it via PS.

  • Proposed as answer by Raf Delgado 2 hours 46 minutes ago
Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 8:31pm

Not sure how you'd do it via PowerShell to be honest, but if you're in a domain environment have you thought of simply doing via Group Policy using Restricted Groups? See this thread which discusses it https://social.technet.microsoft.com/Forums/windowsserver/en-US/dcc1c4bc-dd43-4f90-94a4-38f0719b25f5/steps-to-assign-user-with-local-administrator-rights-in-windows-server-2008-r2?forum=winservergen

That's probably the easiest and most appropriate tool for the job (in a don't re-invest the wheel kind of way), but I apologise if you'd thought of that and had a specific reason to do it via PS.

  • Proposed as answer by Raf Delgado Friday, May 22, 2015 4:24 AM
May 20th, 2015 8:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics