I noticed that this script was only returning a handful of users, closer inspection noted that it was only the cloud-only teams users. Noted line 9 is filtering on InterpretedUserType and since out tenants were migrated from OnPrem Skype for Business, the users were Hybrid InterpretedUserType's.
So i hashed # out line 9 and added the following at line 47
"InterpretedUserType" = $user.InterpretedUserType
I noticed that this script was only returning a handful of users, closer inspection noted that it was only the cloud-only teams users. Noted line 9 is filtering on InterpretedUserType and since out tenants were migrated from OnPrem Skype for Business, the users were Hybrid InterpretedUserType's. So i hashed # out line 9 and added the following at line 47 "InterpretedUserType" = $user.InterpretedUserType