PowerShell commands to check the counts for Users, Computers, OUs, and GPOs in AD environment
Count how many users are...
- Inactive, Expired, Locked, Disabled, Configured with Non-Expiring Passwords
Get computer counts
- Disabled
Get OU counts
- Empty OUs
Get group counts
- Empty Groups
Get GPO counts
- GPOs with No Links (UPDATED LOGIC)
- GPOs with Disabled Links (NEW)
Subnet not Assigned to AD Site
- **NEW** Added new monitor for subnet events. 5807 is the result of new subnets/vlans initiating authentication requests that are not accounted for in Sites and Services. This is just an indication for admins to check the netlogon.log file.
Pre-reqs
Runs on SAM poller Local Host so the SAM system must have...
1. RSAT + AD PowerShell module enabled (or change monitoring to Remote, may require some adjustments)
2. PowerShell 4.0 (standard with Windows Server 2012 R2+)
Note: If you're having issues with components showing up unknown, try extending the timeout on template. Default is 300 seconds. I have found going to 600 to help when running PowerShell queries.
Top Comments