Background:
In an attempt to change language settings for a Windows-11 Home edition, from ES to US.
I managed to get most changes done, but there are still several other items* returning in Spanish.
One Example returning Spanish groups:
Get-LocalGroup
Name Description
---- -----------
Administradores Los administradores tienen acceso completo y sin
Device Owners Los miembros de este grupo pueden cambiar la …
Hyper-V Administrators Members of this group have complete and unrestricted …
IIS_IUSRS Grupo integrado usado por Internet Information Services.
Invitados De forma predeterminada, los invitados tienen el mismo…
...
Looking further how/why these groups are in Spanish, I ran whoami /groups and net localgroup. There I got the following output showing that some groups are listed as Alias under the Type column.
# whoami /groups
Group Name Type SID Attributes
============================================================= ================ ============ ===============================================================
Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Local account and member of Administrators group Well-known group S-1-5-114 Mandatory group, Enabled by default, Enabled group
BUILTIN\Administradores Alias S-1-5-32-544 Mandatory group, Enabled by default, Enabled group, Group owner
BUILTIN\Usuarios Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4 Mandatory group, Enabled by default, Enabled group
CONSOLE LOGON Well-known group S-1-2-1 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Local account Well-known group S-1-5-113 Mandatory group, Enabled by default, Enabled group
LOCAL Well-known group S-1-2-0 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10 Mandatory group, Enabled by default, Enabled group
Mandatory Label\High Mandatory Level Label S-1-16-12288
# net localgroup
Aliases for \\LAPTOP-xxxx
------------------------------------------
*Administradores
*Device Owners
*Hyper-V Administrators
*IIS_IUSRS
*Invitados
*Lectores del registro de eventos
*System Managed Accounts Group
*Usuarios
*Usuarios COM distribuidos
*Usuarios de administración remota
*Usuarios del monitor de sistema
*Usuarios del registro de rendimiento
The command completed successfully.
Q: How to remove these group aliases and see the original group names?
Bonus Question:
Would it remove the ES language from those same items?
Related Question:
The term alias in the output from
net localgroupis somewhat misleading, as it simply refers to the name of a local group - see the bottom section for details.It seems that the following pieces of information are statically assigned based on the Windows display (user-interface) language that the OS was set up with:
The names of built-in local user and group accounts, such as
Administrators(in English) /Administradores(in Spanish).Their descriptions.
Therefore, changing the Windows display language later (by installing a language pack, as discussed in this answer to your linked question) does not change this information, so your only option is to do it yourself - see next section.
In addition to renaming such accounts and updating their descriptions being possible interactively via
lusrmgr.msc, you can also do so programmatically:Caveat:
Renaming user and group accounts can break existing scripts (unless they happen to use SIDs instead of names).
It was an unfortunate design decision on the part of Windows to begin with to localize such names, precisely because it hampers portability of code between machines that shipped with different display languages or, as in your case, switching to a different display language.
Note:
Inexplicably,
Set-LocalUserandSet-LocalGroup, as of version 1.0.0.0 of their enclosingMicrosoft.PowerShell.LocalAccountsmodule, have a hard 48-character limit on the value passed to their-Descriptionparameter.By contrast,
net.exe, via itslocalgroupandusersubcommands, does not have this limitation with its/commentparameter, which is why it is used above.If you have access to a machine that was set up with English during installation and is currently set up for PowerShell remoting, you can create the
$sidMap_Groupsand$sidMap_Usershashtables as follows, assuming$computeras that machine's name:Group-related terminology in
net localgroupandwhoami /groupsoutput:In effect, all local groups are categorized as aliases, irrespective of whether they are built-in groups (e.g.
Adminstrators) or not.Not all built-in groups are represented as local groups, however, namely not those that are purely "virtual" groups whose membership is inferred from the membership of other groups (e.g.
Everyone) andwhoami /groupscalls these well-known groups.In a wider sense, both these subtypes of built-in groups are well-known, and they all have well-known, unchanging SIDs (Security Identifiers).
Since every concrete user and group account has a name that can be changed (including those of built-in groups, as happens implicitly during installation of Windows with a language other than English), the name of a user or group can be conceived of as a - changeable - alias of the user or group's SID, i.e. their - unchanging - identifier.
As for the label line in the output from
whoami /groups: This isn't actually related to user groups, but identifies the integrity level of the current process, in the context of Mandatory Integrity Control:High Mandatory Levelimplies that you've run the command from an elevated session; a non-elevated session showsMedium Mandatory Level.