Solved

Delete local groups with SID number

Posted on 2009-07-02
2
727 Views
Last Modified: 2013-12-05
Hi guys,

I have to delete 4 groups on admnistrators tab of 2003 Servers, i can delete 3 of them with their name but the 4 one includes orphaned sid .
The script errors like " the object could not be member .. " do you have any idea how can we delete these groups inludes SID ?  


Const ForReading = 1
Dim ipfile
ipfile = "C:\par\ip_del.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(ipfile, ForReading)

Do Until objTextFile.AtEndOfStream
   strNextLine = objTextFile.Readline
   arrServiceList = Split(strNextLine , ",")  
   
strComputer = arrServiceList(0)

Set objAdmins = GetObject("WinNT://" & strComputer & "/Administrators")
Set objGroup.Name= "S-1-5-21-1757981266-1580436667-1343024091-514"
objAdmins.Remove(objGroup.ADsPath)
Loop
WScript.Echo("all done")
0
Comment
Question by:pazwant
2 Comments
 
LVL 47

Accepted Solution

by:
Donald Stewart earned 500 total points
ID: 24777642
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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