This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Powershell script to monitor total members in AD group

I am trying to run the powershell script to monitor the total number of members in a group and alert if the number goes below 1100.

The script i am running "fails" but we get the accurate output of 1987

I am not good at powershell scripting, but what more do i need to do so we see that the script is critical <1100

pastedImage_0.png