Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Re: delete/remove users from local administrators grou

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1487
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Re: delete/remove users from local administrators grou
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 Re: delete/remove users from local administrators grou - 4/18/2005 9:27:26 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
group.add("WinNT://SUSD/PC Admins,group")

That doesn't work ?

(in reply to paf1967)
 
 
Post #: 21
 
 Re: delete/remove users from local administrators grou - 4/19/2005 5:02:11 PM   
  k_ravi30

 

Posts: 2
Score: 0
Joined: 4/19/2005
From: India
Status: offline
quote:
Originally posted by token

group.add("WinNT://SUSD/PC Admins,group")

That doesn't work ?





Guys,

Need a help !!!!!!!!!!

I was trying to modify the script given above to add a domainuser to the local admin group without affecting the current entries of the localadmin group.

Things dosent seem to be working.....can anyone help plzzzzzz

Ravi

(in reply to paf1967)
 
 
Post #: 22
 
 Re: delete/remove users from local administrators grou - 4/20/2005 12:15:22 AM   
  mbouchard


Posts: 1863
Score: 14
Joined: 5/15/2003
From: USA
Status: offline
K_ravi30,

All you should need to do is remove everything between and including the lines that start with For Each and Next. This should allow you to only add the user.

(in reply to paf1967)
 
 
Post #: 23
 
 Re: delete/remove users from local administrators grou - 4/24/2005 1:28:21 AM   
  barocco


Posts: 49
Score: 0
Joined: 4/24/2005
From:
Status: offline
will "command prompt" help?
net user /del
ah?

(in reply to paf1967)
 
 
Post #: 24
 
 Re: delete/remove users from local administrators grou - 4/25/2005 6:30:54 PM   
  k_ravi30

 

Posts: 2
Score: 0
Joined: 4/19/2005
From: India
Status: offline
Mike, the suggestion of yours to take off the lines that start with For Each and Next dosent seem to be working, I guess am i doing some slight mistake. It gives out an error as below :

Script : c:\winnt\system32\xxx.vbs
line : x
char : x
Error : 0x80005000
Code : 80005000
Source: (null)

Can you help me solve this plzzzzzzzz

(in reply to paf1967)
 
 
Post #: 25
 
 Re: delete/remove users from local administrators grou - 4/26/2005 3:44:29 PM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Could you post exactly what your script has and exactly at what line the error occured.

(in reply to paf1967)
 
 
Post #: 26
 
 Re: delete/remove users from local administrators grou - 4/28/2005 5:15:59 AM   
  alienprotein

 

Posts: 44
Score: 0
Joined: 2/23/2005
From: USA
Status: offline
FYI- if you are running windows 2k or higher AD then scripting this is unnecessary. You can do this simply through AD by doing the following

1. Open up Policy editor.
2. Go to the following subset "Computer configuration\Windows settings\Security Settings\Restricted groups"
3. Right click on "Restricted Groups", and choose "Add Group"
4. Enter the group name you wish to add/remove members from then click next. i.e. "Administrators"
5. Add whomever you want to have local admin rights.

All local admin rights will be removed an all workstations except the members defined in the policy.

Hope this helps.

(in reply to paf1967)
 
 
Post #: 27
 
 Re: delete/remove users from local administrators grou - 4/28/2005 1:59:35 PM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
I believe he intended to use the script for a NT4 domain (as what he stated in the original post).

(in reply to paf1967)
 
 
Post #: 28
 
 Re: delete/remove users from local administrators grou - 4/29/2005 3:26:51 AM   
  alienprotein

 

Posts: 44
Score: 0
Joined: 2/23/2005
From: USA
Status: offline
ahh I didnt see that.

(in reply to paf1967)
 
 
Post #: 29
 
 Re: delete/remove users from local administrators grou - 4/30/2005 8:22:13 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
I agree with you completely though. If something can be done using GPO (or any other methods provided by the OS), I'll always use that instead. Why doing things the hard way ? :D

(in reply to paf1967)
 
 
Post #: 30
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Re: delete/remove users from local administrators grou Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts