Mushq
August 7th, 2008, 06:48 AM
Hi,
Can anyone please tell me how to convert following script into C# code.
strComputer = "atl-ws-01"
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")For Each objUser In objGroup.Members
If objUser.Name <> "Administrator" AND objUser.Name <> "Domain Admins"
Then
objGroup.Remove(objUser.AdsPath) End IfNext
Thanks,
Mushq
Can anyone please tell me how to convert following script into C# code.
strComputer = "atl-ws-01"
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")For Each objUser In objGroup.Members
If objUser.Name <> "Administrator" AND objUser.Name <> "Domain Admins"
Then
objGroup.Remove(objUser.AdsPath) End IfNext
Thanks,
Mushq