M
Mushq
Hi,
I want to convert following VB6 code to C#, can some one help me
regarding that.
// Code starts here
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 If
Next
// Code end here
actually it is removing users from Local administrator group.
or if some one knows how to delete users from local administrator
group in C#.
Thanks,
Mushq
I want to convert following VB6 code to C#, can some one help me
regarding that.
// Code starts here
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 If
Next
// Code end here
actually it is removing users from Local administrator group.
or if some one knows how to delete users from local administrator
group in C#.
Thanks,
Mushq