active directory users and computer count Powershell | Windows server 2025

preview_player
Показать описание
To count the number of active users in Active Directory using PowerShell, you can use the following command:

Get-ADUser -Filter {Enabled -eq $true} | Measure-Object | Select-Object -ExpandProperty Count

To count the number of enabled computers in Active Directory using PowerShell, you can use the following command:

Get-ADComputer -Filter {Enabled -eq $true} | Measure-Object | Select-Object -ExpandProperty Count

#powershellscript
#powershell
#windowsserver2025
#windowsserver
#activedirectory
Рекомендации по теме