Active Directory Reporting with PowerShell

Huge collection of Active Directory Reports using simple PowerShell commands. Quickly generate reports for Active Directory, Users, Computers, Office 365, Azure, and more. Reports can be customized to fit your exact needs, export to CSV, Excel, HTML, or pdf.

You don’t need to be a PowerShell expert to create awesome reports, these are pre-built PowerShell commands. You just copy the command from the list and click run. Don’t worry, step by step instructions are included. If you want to learn more about PowerShell then these reports will be a great learning experience on how to use PowerShell to interact with Active Directory and Office 365.

Screenshots – click to enlarge

Powerful Active Directory Reports without the High Costs

Create awesome AD Reports and impress your boss with your PowerShell skills 🙂

200+ included reports using simple PowerShell commands

Includes step by step instructions to running and modifying reports

Export to CSV, Excel, PDF, or HTML

Create reports for managers, auditors, security reports, and more.

Buy Now (Only $59)

Features and Benefits

If you manage Active Directory or Office 365 I’m sure you have to deal with managers or auditors requested reports on AD accounts. As a SysAdmin myself I deal with these requests on a regular basis. I also get requests from department supervisors for a list of all active users, or who has permissions to what. You also probably get requests to export data out of Active Directory so it can be imported into another program or cloud system. These PowerShell reports make it easy to export data for whatever use case you need. The best part is you can customize these reports to fit your exact needs. Below are some additional benefits.

  • Find risky accounts
  • Get domain information
  • Find recently created or modified accounts
  • Find unused accounts
  • Users last modified date
  • All users last logon date
  • Create custom reports
  • Increase knowledge of PowerShell
  • Export to multiple formats
  • Minimal requirments
  • Reports run very fast
  • Document your domain environment

Full List of Included Reports

The list will be updated frequently with new reports. If you don’t see a report you need just let me know and I’ll try to add it.

Users

#001 Get all users accounts in a specific domain domain. Includes first name, last name, logon name, street address, company, state, manager, email and job title.

#002 Get all users accounts in the domain. Includes first name, last name, logon name, street address, company, state, manager, email and job title.

#003 Get all users from an organizational unit. Includes user first name, last name, logon name, street address, company, state, manager, email and job title.

#004 Get all users mail and proxyaddresses. Includes first name, last name, logon name, mail and proxyaddresses.

#005 Get all enabled users and list their organizational unit. Includes first name, last name, logon name and Parent Container OU.

#006 Get all users that have dial in set to “Allow access”. Includes user first name, last name, logon name and msNPAllowDialin attribute.

#007 Get all users that are not allowed to dial in. Includes user first name, last name, logon name and msNPAllowDialin attribute

#008 Get all users that have a logon script set. Includes user first name, last name, logon name, scriptpath attribute.

#009 et all users that do not have a logon script, scriptpath attribute is null. Includes user first name, last name, logon name, scriptpath attribute.

#010 Get all users that do not have a manager assigned to them. Includes user first name, last name, logon name and manager.

#011 Get all users that have a manager assigned. Manager attribute is null. Includes user first name, last name, logon name and manager.

#012 Get all users and the UserAccountControl attribute value. Includes user first name, last name, logon name and useraccountcontrol attribute.

#013 Most user accounts are set to normal (512), this will list all accounts that are not set to 512. Includes user first name, last name, logon name and useraccountcontrol attribute.

#014 Get all users and the user principal name. Includes user first name, last name, logon name and userprincipalname attribute.

#015 Get all users and the employeeID & employeenumber. Includes user first name, last name, logon name, employeeID and employeeNumber attribute.

#016 Get user account by a wildcard keyword search, searches user name. Includes first name, last name, logon name and name attribute

#017 Get all disabled user accounts. Includes user fist name, last name, logon name, enabled, created, modified attributes.

#018 Get all enabled user accounts. Includes user fist name, last name, logon name, enabled, created, modified attributes.

#019 Get all locked user accounts. Includes user fist name, last name, logon name, LastBadPasswordAttempt and LastLogonDate attributes.

#020 Get users accounts created in the last 30 days. Seach is based on the whenCreated attribute.

#021 Get user accounts created in the last 60 days

#022 Get user accounts created in the last 90 days

#023 Get user accounts modified in the last 30 days. Search is based on the modified attribute.

#024 Get user accounts modified in the last 60 days

#025 Get user accounts modified in the last 7 days

#026 Get user accounts that do expire. Includes user fist name, last name, logon name, created and accountexpirationdate attribute.

#027 Get all user accounts that will expire in the next 7 days. Includes user name and AccountExpirationDate attribute.

#028 Get all user accounts that will expire in the next 30 days. Includes user name and AccountExpirationDate attribute.

#029 Get all user accounts that have expired. Includes user name and AccountExpirationDate attribute.

#030 Get all users protected by AdminSDHolder. Includes user first name, last name and logon name.

#031 Get all users protected from accidental deletion. Includes user first name, last name logon name and ProtectedFromAccidentalDeletion attribute.

#032 Get all users not protected from accidental deletion. Includes user first name, last name logon name and ProtectedFromAccidentalDeletion attribute.

#033 Get user accounts that AccountNotDelegated is set to true. Includes user name and AccountNotDelegated attribute.

#034 Get all user account that are set to “Do not require Kerberos perauthentication”. Includes user fist name, last name, logon name, and DoesNotRequirePreAuth attribute.

#035 Get the domain password policy details.

#036 Gets users that must change password at next logon. Includes user first name, last name, logon name, user must change password value.

#037 Get all users that changed their passwords in the last 30 days. Includes user first name, last name, logon name and passwordlastset attribute.

#038 Get all users that changed their passwords in the last 60 days

#039 Get all users that do not require a password. Includes user first name, last name, logon name and passwordnotrequired attribute.

#040 Get all users that cannot change their password is set. Includes user first name, last name, logon name and cannotchangepassword attribute.

#041 Get all users and their password expiration date. Includes user displayname and password expiration date.

#042 Get users that require a password change in the next 7 days. Includes user first name, last name, logon name and passwordlastset attribute.

#043 Get users that require a password change in the next 1 days. Includes user first name, last name, logon name and passwordlastset attribute.

#044 Get all users that are configured with a password that will never expire. Includes user first name, last name, logon name and passwordneverexpires attribute.

#045 Get all users accounts that their password has expired. Includes user first name, last name, logon name and passwordexpired attribute.

#046 Get users with bad password attempts in the last 30 days. Includes user first name, last name, logon name and LastBadPasswordAttempt attribute.

#047 Get users with bad password attempts in the last 7 days. Includes user first name, last name, logon name and LastBadPasswordAttempt attribute.

#048 Get users with bad password attempts in the last 1 days. Includes user first name, last name, logon name and LastBadPasswordAttempt attribute.

#049 Get all users that are configured with “Store password using reversible encryption”. Includes user name

#050 Get all users last bad password date and time. Includes user first name, last name, logon name and LastBadPasswordAttempt attribute

#051 Get all user accounts that have no value for the lastlogontimestamp attribute. These are most likely accounts that have never been used. Searches both enabled and disabled accounts.

#052 Get all user accounts that have no value for the lastlogontimestamp attribute. Searches only enabled accounts

#053 Get all users that are set to “Smart card is required for interactive logon”. Includes user first name, last name, logon name, UserAccountControl attribute.

#054 Get users who can log on to all computers. Includes user first name, last name, logon name and logonworkstations attribute.

#055 Get users that are configured to log on to selected computers. Includes user first name, last name, logon name and logonworkstations attribute.

#056 Get users that have logged on in the last 30 days. Includes user first name, last name, logon name and LastLogonDate attribute.

#057 Get users that have logged on in the last 7 days

#058 Get users that have logged on in the last day

#059 Users that have logged on in the last 24 hours

#060 Get all users and list their last logon date. Includes user first name, last name, logon name and LastLogonDate attribute.

Computers

#001 Get all domain controllers. Includes computer name and operatingsystem attributes

#002 Get all computers with a client operating system. Includes computer name and operatingsystem.

#003 Get all computers running windows server. Includes computer name and operatingsystem.

#004 Get all computers and the OU path. Includes computer name, operatingsystem and DistinguishedName.

#005 Get all computers and the IPv4 address. Includes computer name, operatingsystem and IPv4 address.

#006 Get all computers and the IPv6 address. Includes computer name, operatingsystem and IPv6 address

#007 Get all computers created in the last 30 days. Includes computer name, operatingsytem and created date.

#008 Get all computers created in the last 60 days

#008 Get all computers created in the last 60 days

#010 Get all computers modified in the last 7 days. Includes computer name, operatingsytem and modified date.

#011 Get all computers modified in the last 30 days

#012 Get all computers modified in the last 60 days

#013 Get all computers modified in the last 90 days

#014 Get all computers trusted for delegation. Includes computer name, operatingsytem and TrustedForDelegation attribute.

#015 Get all computers with no description. Includes computer name, operatingsytem and description attribute.

#016 Get all disabled computers. Includes computer name, operatingsytem and enabled attribute.

#017 Get all enabled computers. Includes computer name, operatingsytem and enabled attribute.

#018 Get all computers that are managed by another user. Includes computer name, operatingsytem and managedby attribute.

#019 Get all computers that are not managed. Includes computer name, operatingsytem and managedby attribute.

#020 Get all computers from a specific OU. Includes computer name and operatingsystem. Change the SearchBase value to the Distinguished Name value of the OU.

#021 Get computers based on a keyword search, search the computer name. Change the value keyword.

#022 Get all computers and value of the lastlogondate attribute. Includes computer name, operatingsystem and lastlogondate attribute.

#023 Get all computer who logged on last 30 days. Includes computer name, operatingsystem and lastlogondate attribute.

#024 Get all computer who logged on last 7 days

#025 Get all computer who logged on last 1 days

#026 Get all computers that have a blank logon timestamp. These are computers that have not been logged into. Includes computer name, operatingsystem and lastlogontimestamp attribute.

#027 Get computers that have not been logged into for 30 days. Includes computer name, operatingsystem and lastlogontimestamp attribute.

#028 Computers that have not been logged into for 90 days

#029 Get all computers with a client operating system, groups them by OS with count. Includes computer name, operatingsystem.

#030 Get all computers with a server operating systems, groups them by OS with count

#031 Get all computers that do not run a windows operating system. Includes computer name, operatingsystem, OperatingSystemServicePac and OperatingSystemVersion.

#032 Get all computers and lists the name and operating system

#033 Get all windows 10 computers. Includes computer name, operatingsystem, OperatingSystemServicePac and OperatingSystemVersion.

#034 Get all windows 10 computers, groups them by OS with count

#035 Get all windows 7 computers. Includes computer name, operatingsystem, OperatingSystemServicePac and OperatingSystemVersion.

#036 Get all windows 8 computers

#037 Get all computers running windows server 2003

#038 Get all computers running windows server 2008

#039 Get all computers running windows server 2008

#040 Get all computers running windows server 2012

#041 Get all computers running windows server 2012 R2

#042 Gets all computers running windows server 2016

#043 Gets all computers running windows server 2019

#044 Gets all computers running windows XP

Groups

#001 Get all groups in the domain. Includes group name, created date, modified date, description, groupscope and groupcategory.

#002 Get all groups in the domain. Includes group name, created date, modified date, description, groupscope and groupcategory.

#003 Get all built in groups in the domain. Includes group name, created date, modified date, description, groupscope and groupcategory.

#004 Get all groups that have members. Includes group name, created date, modified date, description, groupscope and groupcategory.

#005 Get all groups that have no members. Includes group name, created date, modified date, description, groupscope and groupcategory.

#006 Get all managed groups. Includes group name, created date, modified date, description, groupscope, groupcategory and managedby attribute.

#007 Get all unmanaged groups. Includes group name, created date, modified date, description, groupscope, groupcategory and managedby attribute.

#008 Get all security groups. Includes group name, created date, modified date, description, groupscope, groupcategory and managedby attribute.

#009 Get all distribution groups. Includes group name, created date, modified date, description, groupscope, groupcategory and managedby attribute.

#010 Get all universal groups. Includes group name, created date, modified date, description, groupscope, groupcategory and managedby attribute.

#011 Get all domain local groups. Includes group name, created date, modified date, description, groupscope, groupcategory and managedby attribute.

#012 Get groups created in the last 7 days. Includes group name, modified date, description, groupscope and whencreated attribute.

#013 Get groups created in the last 30 days. Includes group name, modified date, created date, description and groupscope.

#014 Get groups created in the last 60 days. Includes group name, modified date, created date, description and groupscope.

#015 Get groups modified in the last 90 days. Includes group name, modified date, created date, description and groupscope.

#016 Get groups modified in the last 7 days. Includes group name, modified date, created date, description and groupscope.

#017 Get groups modified in the last 30 days. Includes group name, modified date, created date, description and groupscope.

#018 Get groups modified in the last 60 days. Includes group name, modified date, created date, description and groupscope.

#019 Get groups modified in the last 90 days. Includes group name, modified date, created date, description and groupscope.

#020 Get groups not protected from accidental deletion. Includes group name, modified date, created date, description, groupscope and ProtectedFromAccidentalDeletion attribute.

#021 Get groups protected from accidental deletion. Includes group name, modified date, created date, description, groupscope and ProtectedFromAccidentalDeletion attribute.

#022 Get all groups from an organizational unit. Includes group name, modified date, created date, description, groupscope and groupcategory.

#023 Find all groups based on a keyword. Replace the keyword with the string value you want search for. Includes group name.

#024 Get a single users group membership, change the value of LogonName to the users samaccountname. Includes user name and name of group.

#025 Get a list of users from a text file and their group membership.

#026 Get users group membership that are in a specific organizational unit. Includes user name and name of group.

#027 Get all users in the domain and their group membership

#028 Get a single users group membership and include additional user attributes. Includes user logon name, first name, last name, title, description, mail, department and manager.

#029 Get a single users group membership and include nested groups

#030 This can be used for getting group membership for very large groups.

#031 Get single user group membership and include contacts

#032 Get all groups and group members

#033 Get all group members for a single group

#034 Get all group members for all groups in an OU

OUs

#001 All OUs: Gets all OUs in the domain

#002 OU Computer Only: Get all OUs that have computer only objects

#003 OU Group Only: Gets OUs that have group objects only

#004 OU User Only: Get OUs that have user objects only

#005 OU With Members: Get all OUs that have objects (any type)

#006 OU Without Members: Get all OUs that have no member objects (empty OUs)

#007 Managed OUs: OUs that are managed by a user

#008 Unmanaged OUs:

#009 OU Created in The Last 30 Days:

#010 OU Created in The Last 7 Days:

#011 OU Changed in The Last 30 Days:

#012 OU Changed in The Last 7 Days

#013 OU Protected From Accidental Deletion:

#014 OU Unprotected From Accidental Deletion:

#015 OU With Linked GPO:

#016 Find OUs by name using keyword search

#017 OU with no linked GPOs

Group Policy

#001 Get all group policy objects.

#002 Get all group policy objects in a specific domain

#003 Get all GPOs that have all settings disabled

#004 Get all GPOs that have all settings enabled (user and computer settings)

#005 Get GPOs that have the user settings disabled

#006 Get GPOs that have the computer settings disabled

#007 Get all GPOs that have inheritance blocked

#008 Get all GPOs that are not linked to a domain or OU

#009 Get GPOs created in the last 30 days

#010 GPOs created in the last 7 days

#011 GPOs modified in the last 30 days

#012 GPOs modified in the last 7 days

#013 Get all GPOs that are linked to an OU

#014 Get all GPOs linked to the root of your domain. Change DC Root path.

#015 Generate an HTML report of a single GPO and all its settings. Change GPO NAME to the name of the GPO.

Office 365

#001 Get all users and include all properties

#002 Get all properties for a single user

#003 Lists company information stored listed in Office 365

#004 Get all users and display specific user properties(DisplayName, FirstName, LastName,Department, IsLicensed, UserPrincipalName)

#005 Get all users from a specific department.

#006 Get all licensed users

#007 Get all unlicensed users

#008 Get the MFA status for all users

#009 MFA enabled users

#010 MFA not enabled users

#011 List all enabled users

#012 List all disabled accounts

#013 Get all users that are disabled but has a license assigned to the account

#014 Users created in the last 7 days

#015 Users created in the last 30 days

#016 Users created in the last 60 days

#017 All users with password not changed in last 30 days

#018 All users with password not changed in last 60 days

#019 All users with password not changed in last 90 days

#020 All users and theier LastPasswordChangeTimestamp

#021 Get all users synchronized health status

#022 Users that have not synced in last 7 days

#023 Users that have not synced in last 30 days

#024 Users that have not synced in last 60 days

#025 Get all Office 365 Global administrators

#026 Get all users and their license

#027 View license plans available to your company

#028 View details about services available in all of your license plans

#29 Get all users and list their ImmutableID

#30 Users with password set to never expire (security risk)

#031 Get all deleted users

AD Domain

#001 Get AD domain information

#002 Get all childdomains in the domain

#003 Get domain mode

#004 Get domain NetBIOS Name

#005 Get domain DNS Root

#006 Get all domain controllers in the domain

#007 Get all domain controllers in the forest (will include child DCs)

#008 Get all forest information

#009 Get all global catalog servers in the forest

#010 Get all domain and forest FSMO roles

#011 Get the domain password policy

#012 List any fine grain password policies

Azure

See Office 365 Tab

Quick Start Guide

This quick start guide is to give you an example of how easy it is to run the reports.

Step 1: Open AD Reports folder

You will get a zip file called AD Reports. You can extract this anywhere on your computer. It will look like this.

Open one of the folders. For this example, I opened the User Reports folder. All reports are in a text file. You can do whatever you want with these files. You could leave them as is or put them all in one file, a snippet manager, one .ps1 file, or whatever it is completely up to you.

Step 2: Open one of the text files

Now just copy everything and paste it into PowerShell, PowerShell ISE or Visual Studio.

Step 3: Run the report

With the report copied into PowerShell just click the run button. I’m using PowerShell ISE.

Easy Right!

The full administrator guide will show you how to modify the reports and export them to CSV, Excel, PDF, and HTML. Maybe you need a report with just the user’s displayname, department, and email address. Or maybe just users from a specific organizational unit. It’s all easy to do and I show you the exact steps.

Example report exported to Excel (includes just the user displayname, department, and email).

Get AD Reports Now (Only $59)