Hello,
I'm new to PS scripts. could any one of you help me to get this corrected.
I need a script to notify if the user count is greater than 100 in an specified OU.
$Users = (Get-ADUser -SearchBase "OU=Test,DC=Test,DC=Com" -Filter * ).count
if (($Users.count -ge 100).count)
{
Write-Host " New user count is" $User .count
}
I'm getting incorrect output instead of the actual one. could you help me to correct me ?
Thanks