Merge pull request #630 from BuFuuu/com-hijacking-lang-update

find os language independent users group by using the SID
This commit is contained in:
Carlos Polop 2023-05-26 11:40:44 +02:00 committed by GitHub
commit 3af643b138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,10 @@ foreach ($Task in $Tasks)
{
if ($Task.Triggers.Enabled -eq $true)
{
if ($Task.Principal.GroupId -eq "Users")
$usersSid = "S-1-5-32-545"
$usersGroup = Get-LocalGroup | Where-Object { $_.SID -eq $usersSid }
if ($Task.Principal.GroupId -eq $usersGroup)
{
Write-Host "Task Name: " $Task.TaskName
Write-Host "Task Path: " $Task.TaskPath