Forum Discussion
TheGarrison
Feb 24, 2023Copper Contributor
Powershell Query - Sum / Total / Count
Hi, When i run this : Get-CsOnlineUser | Where-Object { $_.AssignedPlan -like "MCOEV_VirtualUSER" } | select UserPrincipalName, LineURI It works fine and returns all the objects i would exp...
- Feb 24, 2023
TheGarrison I'm pretty sure you should be using Count not Sum, there isn't anything to add up.
It's perhaps a quirk that sum works in other places, should all be using Count in my opinion.
(Get-CsOnlineUser | Where-Object { $_.AssignedPlan -like "MCOEV_VirtualUSER" }).Count
StevenC365
Feb 24, 2023MVP
TheGarrison I'm pretty sure you should be using Count not Sum, there isn't anything to add up.
It's perhaps a quirk that sum works in other places, should all be using Count in my opinion.
(Get-CsOnlineUser | Where-Object { $_.AssignedPlan -like "MCOEV_VirtualUSER" }).Count