Skip to content

Commit f460272

Browse files
Add support for one more S- pattern
1 parent 7694491 commit f460272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Powershell/General Functions/Add-UserRights.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ PROCESS
166166
Default { "($right)" }
167167
}
168168
Write-Output ("$(Time-Stamp)Granting `"$UserLogonRight`" to user account: $Username on host: $computer.")
169-
if ($Username -match "^S-.*-.*-.*$|^S-.*-.*-.*-.*-.*-.*$|^S-.*-.*-.*-.*-.*$")
169+
if ($Username -match "^S-.*-.*-.*$|^S-.*-.*-.*-.*-.*-.*$|^S-.*-.*-.*-.*-.*$|^S-.*-.*-.*-.*$")
170170
{
171171
$sid = $Username
172172
}

0 commit comments

Comments
 (0)