nav2567
asked on
Add members to local group of remote computers using power shell.
Hi,
I need to add a AD group to a local group (Remote Desktop User) of a lot of servers.
Can I use power shell to read a file with list of servers and add a domain group to the Remote Desktop Users (local group) of each of the server in the list?
Thanks.
I need to add a AD group to a local group (Remote Desktop User) of a lot of servers.
Can I use power shell to read a file with list of servers and add a domain group to the Remote Desktop Users (local group) of each of the server in the list?
Thanks.
Wouldn't it be easier to do that via GPO and just deploy it to the servers you need?
Hopefully you're running an Active Directory domain. If you are then doing this using PowerShell is a terrible idea. If you're not, well than PowerShell might be your only option. If you are running Active Directory you should be looking at using a GPO to manage local groups on servers. Its very easy to do.
Someone has written an article here on EE, it's not the best so I would suggest following some guides on Petri.com. There are 2 ways to do this using GPO's:
1. Restricted Groups: https://www.petri.com/manage-local-active-directory-groups-using-group-policy-restricted-groups
2. Group Policy Preferences (GPP) - the new way: https://www.petri.com/manage-local-active-directory-groups-using-group-policy-preferences
Someone has written an article here on EE, it's not the best so I would suggest following some guides on Petri.com. There are 2 ways to do this using GPO's:
1. Restricted Groups: https://www.petri.com/manage-local-active-directory-groups-using-group-policy-restricted-groups
2. Group Policy Preferences (GPP) - the new way: https://www.petri.com/manage-local-active-directory-groups-using-group-policy-preferences
ASKER
Learnctx, we cannot use GP in this case.
Pony10us, your solution is close but we will need a script to read file server file and process the ADD.
Pony10us, your solution is close but we will need a script to read file server file and process the ADD.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://gallery.technet.microsoft.com/scriptcenter/Add-AD-UserGroup-to-Local-fe5e9239