RuntimeException: Attempted to divide by zero.
morgsdaly opened this issue · comments
The script is not working for me. I think maybe the issue is here:
$Teams = $Teams | Sort DisplayName
sort: No such file or directory
I can confirm that Teams do get pulled back before the sort.
What script are you referring to?
It must be ReportTeamsChannels.PS1
Change the Sort to Sort-Object and see if that helps.
Yes. Sorry. It was ReportTeamsChannels.PS1
In the end I added Sort-Object and the following straight after: Connect-MicrosoftTeams so that it reads like this.
$Teams = $Teams | Sort-Object -Property Displayname
Connect-MicrosoftTeams
Otherwise, thank you. The script was very useful.
There is a line in the script to check that you have the Microsoft Teams module loaded. Did that not work? In any case, I am closing this issue now.