Atlantiraptor Docs

Windows.System.LocalAdmins

Type: Client

Retrieves local administrator accounts from a Windows system via PowerShell.

Required permissions: EXECVE

Parameters

Name Type Default Description
PowerShellExe string C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

References

Source

Defined in artifacts/definitions/Windows/System/LocalAdmins.yaml.

name: Windows.System.LocalAdmins
description: |
  Retrieves local administrator accounts from a Windows system via
  PowerShell.

reference:
  - https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/get-localgroupmember?view=powershell-5.1

type: CLIENT

required_permissions:
  - EXECVE

parameters:
 - name: PowerShellExe
   default: "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"

sources:
  - precondition:
      SELECT OS From info() where OS = 'windows'

    query: |
      LET script <= 'Get-LocalGroupMember -SID S-1-5-32-544 | select -ExpandProperty SID -Property Name, PrincipalSource | select Name, Value, PrincipalSource | ConvertTo-Json'

      LET out = SELECT parse_json_array(data=Stdout) AS Output
          FROM execve(argv=[PowerShellExe,
               "-ExecutionPolicy", "Unrestricted", "-encodedCommand",
                  base64encode(string=utf16_encode(
                  string=script))
            ], length=1000000)
      SELECT * FROM foreach(row=out.Output[0],
      query={
          SELECT Name, Value AS SID, if(condition=PrincipalSource=1,
            then="Local", else=if(condition=PrincipalSource=2,
            then="Domain", else=PrincipalSource)) AS PrincipalSource
          FROM scope()
      })

Edit this page on GitHub

© 2026 Atlant Security EOOD. Atlantiraptor is free software under the GNU Affero General Public License v3. It is based on Velociraptor by Velocidex, and keeps its copyright notices. Velociraptor is a trademark of its owner; Atlantiraptor is not affiliated with or endorsed by it.