Manage Teams classes and policies — reference notes
Find the Teams Management class-count, test-run and report references. Some examples depend on custom functions or a report-location note that remains held.
Source-derived reference
These notes were recovered from OneNote. Configuration, permissions and operating results have not been freshly verified. Confirm the applicable authority and environment before acting.
Count Edumate Classes By School For Current Year
Custom-function example: Calls Edumate API for each school collecting their Class information.
The Group-Object counts all the teams for each school based on the derived x_school_first_name attribute.
Get-AllSchoolClassesFromEdumate | Where-Object {$.class_name -notlike "Assembly" -and $.class_name -notlike "Chapel" -and $.class_name -notlike "Study" -and $.class_code -notlike "Duty*" -and $_.course_name -notlike "Buses"} | Group-Object x_school_first_name
Test Run of the Script
$groupUpdateResults_16Jan2026 = Update-TeamsManagerApp -quiet -testonly
measure-command {$groupUpdateResults_16Jan2026_161801 = Update-TeamsManagerApp -quiet -testonly}
View All Script Managed Teams/M365 Classes/Groups
In the IT Manager Report Folders for your school you can access a current list of your classes/Teams from M365 inside a report that looks like <insert school short name>_M365_ClassesAndMembers.csv
Example Livingstone: LIVCC_M365_ClassesAndMembers.csv
Example from Chinchilla: CHICC_M365_ClassesAndMembers.csv
Get All Users Object (Teams Admin)
Get-CsOnlineUser returns a list of Teams user objects from Team Administation.
#Get All Users From Teams Management #May take a minute to run. $allusers = Get-CsOnlineUser
#Excluding (Filtering Out) Users by AccountType
$allusersA = Get-CsOnlineUser -Filter {AccountType -ne 'Guest'}
$allusersB = Get-CsOnlineUser -Filter {$null -eq SoftDeletionTimestamp}
$allusersC = Get-CsOnlineUser -Filter {AccountType -ne 'IneligibleUser'}
#Show Properties of first user from list of $allusers $alluser | Select-Object -First 1
Screenshot retained for review