locked
PS script to notify if user count is greater than 100 in specified OU RRS feed

  • Question

  • 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


    • Edited by RMKV Sunday, November 29, 2020 7:26 AM
    Sunday, November 29, 2020 7:22 AM

All replies