• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 765
  • Last Modified:

PowerShell - Quest - How to nest a group into multiple servers .

I have a list of servers that I need to nest a group in the Local Administrators group.
Anyone know how I can add the list of servers to a text file and then nest a group into all those servers ?

I cant do it via GPO since they are all in different OUs.
0
MilesLogan
Asked:
MilesLogan
1 Solution
 
SubsunCommented:
Try this for adding the Domain Group to the local Admin group.
GC C:\Servers.txt | %{

$domain="YourDomain.com"
$group = "YourGroup"

([adsi]"WinNT://$_/Administrators,group").Add("WinNT://$domain/$group,group")
}

Open in new window

0
 
MilesLoganAuthor Commented:
Worked perfect ! thank you !
0
 
cawasakiCommented:
sorry!
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now