Counting the Number of AD User Accounts in PowerShell

Here are some PowerShell examples that we can use to count the numbers of user accounts in Active Directory. Total number of user accounts in AD PS> (Get-ADUser -filter *).count Total number of user accounts in an OU PS> (Get-ADUser -filter * -searchbase “OU=Vancouver, OU=MyCompany, DC=Domain, DC=Local”).count Replace the SearchBase with your own OU path. Total number of enabled/disabled accounts in […]

Configuring AD Server to Sync Time with External NTP Server

If you got this message regarding your AD server that has PDC emulator role doesn’t have a proper NtpClient set up, like below: Here is how you can get this sorted out: Log on to the AD server (with PDC role) with administrator account and open elevated command prompt, and run the following commands: net stop w32time w32tm /config /manualpeerlist:”0.uk.pool.ntp.org,0x1 […]