Atlantiraptor Docs

Windows.System.DomainRole

Type: Client · Author: Matt Green - @mgreen27

Extracts and categorizes the domain role of Windows systems based on Win32_ComputerSystem WMI data.

Parameters

Name Type Default Description
HostNameRegex string . Regex filter by DNSHostName
DomainRegex string . Regex filter by Domain
RoleRegex string . Regex filter by Role

Source

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

name: Windows.System.DomainRole
author: 'Matt Green - @mgreen27'
description: |
    Extracts and categorizes the domain role of Windows systems based
    on `Win32_ComputerSystem` WMI data.

type: CLIENT

parameters:
   - name: HostNameRegex
     description: Regex filter by DNSHostName
     default: .
   - name: DomainRegex
     description: Regex filter by Domain
     default: .
   - name: RoleRegex
     description: Regex filter by Role
     default: .
     
sources:
  - precondition:
      SELECT OS From info() where OS =~ 'windows'

    query: |
        SELECT 
            Domain, 
            DNSHostName, 
            if(condition= DomainRole=0,
                then='Standalone Workstation',
                else=if(condition= DomainRole=1,
                    then='Member Workstation',
                    else=if(condition= DomainRole=2,
                        then='Standalone Server',
                        else=if(condition= DomainRole=3,
                            then='Member Server',
                            else=if(condition= DomainRole=4,
                                then='Backup Domain Controller',
                                else=if(condition= DomainRole=5,
                                    then= 'Primary Domain Controller',
                                    else= 'Unknown' )))))
                ) AS DomainRole
        FROM wmi(query='SELECT * FROM Win32_ComputerSystem',namespace='ROOT/cimv2')
        WHERE 
            DNSHostName =~ HostNameRegex
            AND Domain =~ DomainRegex
            AND DomainRole =~ RoleRegex

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.