Hello !!
I tried your script and it was failing on my end under PowerShell v.4, v.5, and PowerShell core 7+
The error was the following:
Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'.
What I did to resolve it was replace the "+=" with just "=". Is this something that I am not doing right? Is this something that you know about it.
By doing the above correction I am getting results, however I am not getting all the disconnected users.
Hello !! I tried your script and it was failing on my end under PowerShell v.4, v.5, and PowerShell core 7+ The error was the following:
Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'.
What I did to resolve it was replace the "+=" with just "=". Is this something that I am not doing right? Is this something that you know about it. By doing the above correction I am getting results, however I am not getting all the disconnected users.