Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

Active Directory Group Reporting

Posted on March 31, 2021March 31, 2021

I've pushed v1.2.0 of the ADReportingTools module to the PowerShell Gallery. The release adds the missing help for Get-ADComputerReport. I've also added better documentation and information in warning messages when running commands in the PowerShell ISE or VS Code. To re-iterate, the module is designed to be run from a PowerShell console host. It is my belief that the PowerShell ISE and VS Code are fine for developing code, but you should run all code from a console session. I toyed with modifying the module manifest to require the ConsoleHost, but that also eliminated the option to run commands in a background job.

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

Here's what you can expect from the new versions.

HTML Group Reports

I've added a new command called New-ADGroupReport that is based on Get-ADGroupReport. The new command will create an HTML report of group membership, complete with collapsible regions like the other HTML reporting commands.

Disabled accounts will be highlighted in red and there is user detail when you hover over the user's distinguished name. You can see the complete sample HTML report here.

Argument Completers

The module uses a background runspace and a synchronized hashtable to enable argument completers on some module commands. These allow you to tab-complete values. I've added new completers. First, since I'm getting domain controllers in the synchronized hashtable, any of the module commands with a Server parameter can now be tab-completed. Then I realized, why stop there? I also added the same argument completer for any GET command in the ActiveDirectory module. Now you can run 'Get-ADUser administrator -server <tab>' and tab-complete a server name. I can think of a few other ways I might leverage this concept.

Try It

You can install ADReportingTools from the PowerShell Gallery. Or take a look at the repository's README. And don't forget you can always view the module documentation by running Open-ADReportingToolsHelp to launch a PDF.


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

4 thoughts on “Active Directory Group Reporting”

  1. Dee Cee says:
    April 26, 2021 at 6:12 pm

    I am new to Powershell and I am running into a bit of trouble with getting group information.
    After running the New-ADGroupReport using -SearchBase -Name -ReportTitle -Filepath. I am getting the following error.
    WARNING: The size limit for this request was exceeded
    WARNING: No group data found to build a report with.

    Am I doing something wrong here or could this be because these is a large group.

    1. Jeffery Hicks says:
      April 26, 2021 at 6:25 pm

      It very well could be a large group problem. Please post this as an issue in the GitHub repository ( https://github.com/jdhitsolutions/ADReportingTools/issues) including approximately how many members are in the group.

  2. IKE says:
    May 19, 2021 at 10:17 pm

    Hi, I have a question on this module.
    Does this module support background job?
    When I run it with Start-job for New-ADGroupReport for example, the job failed as below message.

    The ‘New-ADGroupReport’ command was found in the module ‘ADReportingTools’, but the module could not be loaded.

    1. Jeffery Hicks says:
      May 20, 2021 at 9:04 am

      Did you install ADReportingTools from the PSGallery? Can you run it in an interactive session? You need to have the ActiveDirectory and DNSClient modules installed. My module is designed to be run on a Windows 10 member desktop. If you can run Import-Module ADReportingTools at a console prompt, I don’t know why you would get this error.

Comments are closed.

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d