Get-Team A parameter cannot be found that matches parameter name ‘Display Name'

Introduction

After installing the Teams module as per the instructions from the Microsoft Documentation, when running the command Get-Team after connecting to Teams Admin using the command

Connect-MicrosoftTeams, I am getting the following error

Get-Team A parameter cannot be found that matches parameter name ‘Display Name'

Initially, I got stumbled on why I was getting this. I did the install correctly, and as you observe in the screenshot, I have used the variable $TeamsConnection, initialized with connect-MicrosoftTeams, and checked the output, whether my connection is successful or not.

Everything looks correct. After this, I tried with the MailNickName property and got the same issue.

Get-Team A parameter cannot be found that matches parameter name ‘Display Name'

Fix

After some internet research, I learned that there is another module in the loaded PowerShell modules conflicting with the MicrosoftTeams PowerShell modules methods. In this case, when I tried to see the get-module I could see the ShareGate module is also loaded, which is the culprit.

Get-Team A parameter cannot be found that matches parameter name ‘Display Name'

When ShareGate Module gets loaded together with the MicrosoftTeams PowerShell module, the Get-Team command seems to be failing. When removing the module from the current sessions, the Get-Team command seems to work fine.

Get-Team A parameter cannot be found that matches parameter name ‘Display Name'

Get-Team A parameter cannot be found that matches parameter name ‘Display Name'

Conclusion

Thus, in this blog you have seen the error why Teams PowerShell commands are failing even though the PS module loaded successfully, and the fix to remediate the issue.

References

https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install