Get-Team A Parameter Can Not 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.

Connect-MicrosoftTeams

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

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

MailNickName property

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.

PowerShell modules

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.

ShareGate Module

Output

Conclusion

Thus, in this blog, you have seen the error of 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

Ebook Download
View all
Learn
View all