mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
e0889d51db
* move Microwin related stuff to own Folder under "Functions" * update runspace function gathering logic * update Recall logic (from main repo) * change to easier naming scheme - rename files - rename function names * remove unneeded comment (after @CodingWonders's suggestion)
21 lines
761 B
PowerShell
21 lines
761 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
|
|
}
|
|
} |