Re: AD in Local Groups differente languajes?

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 05/09/04


Date: Sun, 09 May 2004 21:51:30 +0200

Emiliano G. Estevez wrote:

> I made a vbscript to add AD users (Administrators, Control Groups, etc.) to
> the local Administrators group on every workstation, the problem is that I
> have different languages on the workstation and the Administrators group
> works for the English language but not for the Spanish because in Spanish is
> administradores, so, anybody can suggest me a workaround for my script.
Hi

To run this WMI query against NT4 computers, WMI needs to be installed
on them (WMI comes default with WinME, Win2k, WinXP and Win2k3):

' Script is based on information in this article:
'
' Well Known Security Identifiers in Windows (Server) Operating Systems
' http://support.microsoft.com/?id=243330

strComputer = "." ' use "." for local computer
strGroupSID = "S-1-5-32-544" ' Well Known SID of the group

'On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
     ("Select * from Win32_Group WHERE SID = '" & strGroupSID & "'")

For Each objItem in colItems
   Wscript.Echo "Name of the Administrators group: " & objItem.Name
Next

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx


Relevant Pages

  • Windows 2003 and WMI question
    ... I have a script that utilize wmi to get the local Administrators group name ... in different OS languages (Administrators group names differently in ... The script works fine with Windows 2000/XP. ...
    (microsoft.public.scripting.vbscript)
  • Re: My new Script Library - opinions please
    ... Thanks for including Rexx/ooRexx as one of your scripting languages; ... Would you be interested in ooRexx scripts that use some of the ... BIF/Objects included in ooRexx that bypass then need to use WMI? ...
    (microsoft.public.scripting.wsh)
  • Re: Privileges to install fonts (ttf files)
    ... administrators group or the local power users group) to install additional fonts? ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.general)
  • Re: Remove Users From Local Admin Group
    ... > local Admin group from the login script. ... Both local and domain users will be removed ... ' account from the Administrators group will fail. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Script for creating a new user
    ... I want to create a local user. ... Creating a local user and adding it to the Administrators group ... ' Use error handling in case the account is a member already ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)