ADReportingTools

This module contains a collection of PowerShell tools that you can use to generate reports and gather information about your Active Directory domain. Many of these commands will require the ActiveDirectory module, which you can get by installing the Remote Server Administration Tools (RSAT) for Active Directory on Windows 10.
Get-WindowsCapability -Online -Name RSAT.Active* | Add-WindowsCapability -online
The assumption is that you will run these commands with administrator credentials from a Windows 10 desktop. You should not need console access to a domain controller. Athough some module commands will use PowerShell remoting over WSMAN to gather information. These commands are designed to work with a local Active Directory infrastructure, not anything in Azure.
Installation
This module is available in the PowerShell Gallery. Install it with Install-Module after you have installed the Active Directory RSAT capability.
Install-Module -name ADReportingTools -force
Once installed, you can run a command like Get-ADReportingTools to see list of commands. Or run Open-ADReportingToolsHelp to launch a PDF version of this file, as well as command documentation.
Design Philosophy
The Active Directory module from Microsoft is not especially difficult to use. It is quite easy to get information from Active Directory.
Get-ADuser -filter "department -eq 'sales'" -properties Title,Department
However, you have to be very explicit about what information you want to see. You might need to create complicated filters. You need to know the Active Directory property names. Finally, you need to format the results into something meaningful. It might be better to think of the ActiveDirectory module as a framework.
The ADReportingTools module is built on this framework. The goal is to create a set of commands and tools to make it very easy to get information out of Active Directory in meaningful and useful ways. Many of the functions in this module are wrappers for underlying ActiveDirectory module commands, written to be easy to use.
The ADReportingTools focuses primarily on working with Active Directory users, groups, and computers. The module includes commands designed to be true reporting commands. As the module name suggests, module commands are intended to get information from Active Directory. This module is not designed to manage it. There are no commands to set, create, or remove anything from Active Directory.
⚠️
These commands have not been tested in a large domain environment, or one with cross-domain trusts and/or nested groups that cross domains. If you have used the ActiveDirectory modules in the past and had poor performance due to these types of circumstances, the modules in this command most likely won't perform any better because they are still relying on the same Active Directory cmdlets..
Module Commands
The commands in this module, and may of the supporting files, are intended to be run from a PowerShell console host session. If you run some commands in the PwoerShell ISE or VS Code, you may see a warning about an incompatibility or your may have a poor experience. There is no intention of making this module 100% compatible with the ISE or VSCode.
Get-ADReportingTools is a meta-command. Run this command to get a formatted list of available commands in the ADReportingTools module.

All module documentation, including this README and command help, has been compiled into a PDF. Run Open-ADReportingToolsHelp to view the file.

The command will launch the application associated with PDF files.
Users

Often you will find user names in the form domain\username. This command makes it easier to find the Active Directory user account using this value. If the Active Directory Recycle Bin feature is enabled, you can use the IncludeDeletedObjects parameter to search for the user account if it can't be found with the initial search.

This command will search the Security event logs on your domain controllers for specific user-related events. These activities are not replicated, so you have to search each domain controller. Be aware that you may see related events for some actions. For example, if you create and enable a new user, you'll see multiple entries for the same event.
The output will show you the user accounts that match the search criteria, and the domain account that was responsible. Although, this command can't tell you which administrator is responsible for which activity. The best you can learn is that for a given time frame, these user accounts were managed. Or these administrators did something. You would need to search the event log on the domain controller for more information.

Get-ADUserCategory is based on the concept of getting user information from a pre-defined category. For example, you might want to get the properties DisplayName, Name, Title, Department, and Manager for a Department category. The ADReportingTools module will define a set of pre-defined categories that you can reference through $ADUserReportingConfiguration.
PS C:\> $ADUserReportingConfiguration
Name Properties
---- ----------
Department {DisplayName, Name, Title, Department...}
Basic {DisplayName, Name, SamAccountname, UserPrincipalName...}
Address {DisplayName, Name, TelephoneNumber, Office...}
Organization {DisplayName, Name, Title, Department...}
Pwinfo {DisplayName, Name, PasswordExpired, PasswordLastSet...}

The module ships with a JSON file that defines the categories. You can easily modify this variable to define a new category.
$ADUserReportingConfiguration += [pscustomobject]@{Name="Custom";Properties="DisplayName","Description"}
Or add a property to an existing category.
PS C:\> $ADUserReportingConfiguration.where({$_.name -eq 'basic'}).foreach({$_.properties+="SID"})
PS C:\> Get-ADUserCategory gladysk -Category Basic
DistinguishedName : CN=GladysK,OU=IT,DC=Company,DC=Pri
DisplayName : Gladys Kravitz
Name : GladysK
SamAccountname : GladysK
UserPrincipalName : gladysk@Company.Pri
Enabled : True
WhenCreated : 1/25/2021 1:32:35 PM
WhenChanged : 3/8/2021 6:52:01 PM
SID : S-1-5-21-493037332-564925384-1585924867-1105
The user's distinguished name is always included in the output.
A related command is Get-ADDepartment. This command will get members of a given department. When you import the ADReportingTools module, it will define a global variable called ADReportingHash, which is a hashtable. The variable has a key called Departments. This variable is used in an argument completer for the Department parameter so that you can tab-complete the parameter value.

Disabled accounts will be displayed in red. Or you can use one of the custom views.

This command will take an Active Directory distinguishedname and break it down into its component elements. The command does not test or verify any of the elements. It is merely parsing a text string.
PS C:\> Split-DistinguishedName "CN=Foo,OU=Bar,OU=Oz,DC=Research,DC=Globomantics,DC=com"
Name : Foo
Branch : Bar
BranchDN : OU=Bar,OU=Oz,DC=Research,DC=Globomantics,DC=com
Domain : Research
DomainDN : DC=Research,DC=Globomantics,DC=com
DomainDNS : Research.Globomantics.com
Groups

The Get-ADGroupUser command will display all users of a given Active Directory group. The search is automatically recursive. The default output is a formatted table that will highlight disabled accounts in red. The ANSI color coding will only work in a console session.

Or you can use the default list view.

Get-ADGroupReport will create a custom report for a group showing members. Get-ADGroupUser is intended to display group membership details Get-ADGroupReport focuses on the group, although members are also displayed. Members are always gathered recursively. You can filter for specific types of groups. You can also opt to exclude groups under CN=Users and CN=BuiltIn. The groups "Domain Users", "Domain Computers", and "Domain Guests" are always excluded from this command.