Skip to content
GitHub

Invoke-ADCheck


InvokeADCheck is a PowerShell module designed to streamline the assessment of Active Directory (AD) environments. It performs various checks to identify potential security misconfigurations, weaknesses, and adherence to best practices. By running targeted checks through the PowerShell CLI, this module provides detailed results and actionable insights. It equips IT administrators and security professionals with the means to proactively identify and address potential security risks in AD environments.

Note: InvokeADCheck is primarily intended for use in smaller Active Directory domains within a single AD forest. This module is provided “as-is” with no support or guarantees.

To use InvokeADCheck, ensure the following prerequisites are met:

  • PowerShell Version 5.0 (or later)
  • Windows 10 or Windows 2016 (or newer)
  • PowerShell Active Directory Module

Optional:

  • PowerShell Group Policy Module

To install the module directly, run the following PowerShell command:

iex(New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/sensepost/InvokeADCheck/refs/heads/main/Install.ps1")

Import-Module .\InvokeADCheck.psm1

Alternatively, clone the repository to your machine, navigate to the \InvokeADCheck\releases\InvokeADCheck directory, and import the module into your session for testing without installation:

Import-Module .\InvokeADCheck.psm1

Run all checks and output results to the console

Section titled “Run all checks and output results to the console”
PS C:\> Invoke-ADCheck

Run specific checks and output results to the console and a JSON file

Section titled “Run specific checks and output results to the console and a JSON file”
PS C:\> Invoke-ADCheck -Checks ADBackupStatus, DomainController -OutputTypes CLI, JSON -OutputPath C:\Temp

Run all checks and output results to both the console and an Excel file

Section titled “Run all checks and output results to both the console and an Excel file”
PS C:\> Invoke-ADCheck -OutputTypes CLI, XLSX -OutputPath C:\Temp

Run all checks with a specific domain controller and credentials

Section titled “Run all checks with a specific domain controller and credentials”
PS C:\> Invoke-ADCheck -OutputTypes CLI -Server "ad.domain.tld" -Credential (Get-Credential)
CheckDescription
AllRun all available checks
ADBackupStatusRetrieve the status of Active Directory backups
BuiltInGroupMembershipRetrieve the membership of built-in Active Directory groups
DefaultAdministratorRetrieve the default Administrator account settings
DefaultDomainPasswordPolicyRetrieve the default domain password policy
DomainControllerRetrieve information about domain controllers
DomainTrustRetrieve domain trust relationships
FunctionalLevelRetrieve the domain and forest functional levels
GPORetrieve Group Policy Objects (GPOs)
GPOPermissionRetrieve permissions on Group Policy Objects
GPPPasswordRetrieve Group Policy Preferences (GPP) passwords
GuestAccountRetrieve the status of Active Directory guest accounts
KerberosDelegationRetrieve Kerberos delegation settings for accounts
KerberosEncryptionTypeRetrieve the Kerberos encryption types used in the domain
KerberosServiceAccountRetrieve information about the built-in KRBTGT account
MachineQuotaRetrieve the ms-DS-MachineAccountQuota attribute
ProtectedUsersGroupRetrieve information on the Protected Users group
RootACLRetrieve interesting Access Control Entries (ACEs) from the domain root ACL (experimental)
TombstoneLifetimeRetrieve the Active Directory tombstone lifetime attribute
UserAccountHealthChecks the health of Active Directory user accounts

example