Solved

Delete local groups with SID number

Posted on 2009-07-02
2
719 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:
dstewartjr earned 500 total points
ID: 24777642
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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...
Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

20 Experts available now in Live!

Get 1:1 Help Now