Skip to content

Commit

Permalink
Fresh build.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrimarcJake committed Nov 10, 2024
1 parent 0e41b96 commit d0bbe92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Invoke-Locksmith.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2675,9 +2675,9 @@ function Test-IsADAdmin {
#>
if (
# Need to test to make sure this checks domain groups and not local groups, particularly for 'Administrators' (reference SID instead of name?).
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole('512') -or
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole('544') -or
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole('519')
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Domain Admins") -or
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Administrators") -or
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Enterprise Admins")
) {
Return $true
}
Expand Down

0 comments on commit d0bbe92

Please sign in to comment.