Count Number of AD Users – PowerShell

Very quick piece of PowerShell that will count the number of AD Users in your domain

We can then extend this to only count the Enabled AD users

This is all well and good but we want to dive deeper and search on multiple OUs.

(more…)

Read More

Active Directory Users Created In Last 30 Days – PowerShell

As part of an Active Directory project we have been involved with, there had been a compliance issue where the Service Desk were creating users with “Password Never Expires”, which was against the security policy of the company.

To help identify the incorrectly created Users and also to fix them, this script was created;

(more…)

Read More

Active Directory Dormant User Report – PowerShell

Working on a recent large multi site Active Directory environment, we were asked to come up with a PowerShell script that will help the AD Team identify dormant user accounts in their AD domain.

Firstly, we had to establish what a dormant user was, and it was agreed that this would be a User account that has not logged in for 60 days. Then we needed to find out of there were any exceptions to this policy, such as maternity or sick (we didnt want to report on this accounts). Finally, we wanted to exclude any Service accounts or Resource accounts, so we had to get the DN of these as well.

(more…)

Read More