Solved

PowerShell - Quest - How to Remove a group from multiple machines.

Posted on 2013-01-09
2
716 Views
Last Modified: 2013-01-10
I just got great help from Subsun on adding a group to multiple machines ( link below) , now Id also would like to be able to remove a group from multiple machines .

Thank you for all the help !

http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_27989227.html
0
Comment
Question by:MilesLogan
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38760005
You just need to change Add to Remove
GC C:\Servers.txt | %{

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

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

Open in new window

0
 
LVL 2

Author Closing Comment

by:MilesLogan
ID: 38763873
Thank you !
0

Join & Write a Comment

Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now