?
Solved

Delete local groups with SID number

Posted on 2009-07-02
2
Medium Priority
?
733 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 47

Accepted Solution

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

Featured Post

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

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...
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

771 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