Solved

Delete local groups with SID number

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

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

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…
Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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