mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-25 07:21:30 -06:00
d619ee7e85
Specifically, it fixes a reference issue for the "Recall fix". Thankfully, we're not making a release yet :)
22 lines
762 B
PowerShell
22 lines
762 B
PowerShell
function Microwin-GetLocalizedUsers
|
|
{
|
|
<#
|
|
.SYNOPSIS
|
|
Gets a localized user group representation for ICACLS commands (Port from DISMTools PE Helper)
|
|
.PARAMETER admins
|
|
Determines whether to get a localized user group representation for the Administrators user group
|
|
.OUTPUTS
|
|
A string containing the localized user group
|
|
.EXAMPLE
|
|
Microwin-GetLocalizedUsers -admins $true
|
|
#>
|
|
param (
|
|
[Parameter(Mandatory = $true, Position = 0)] [bool]$admins
|
|
)
|
|
if ($admins) {
|
|
return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-544" }).Name
|
|
} else {
|
|
return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-545" }).Name
|
|
}
|
|
}
|