I do have a problem getting the MicrosoftTeams module loaded in PowerShell. I downloaded and imported the module with AllSigned authorization (no errors):
PS C:\WINDOWS\system32> Install-Module -Name MicrosoftTeams
PS C:\WINDOWS\system32> Import-Module MicrosoftTeams
Checking, whether the Module is loaded correctly, I also printed the available modules where it is displayed with the current version number:
PS C:\WINDOWS\system32> get-module -listavailable
Verzeichnis: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.0.1 Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary 1.1.4 MicrosoftTeams {Add-TeamUser, Connect-MicrosoftTeams, Disconnect-Microsof...
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script 3.4.0 Pester {Describe, Context, It, Should...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remov...
Now, I wanted to connect to the Teams using the cmdlet Connect-MicrosoftTeams
which is explicitly listed as one of the exported cmdlets in this imported module. But somehow, PowerShell does not find the command:
PS C:\WINDOWS\system32> Connect-MicrosoftTeams
Connect-MicrosoftTeams : Die Benennung "Connect-MicrosoftTeams" wurde nicht als Name eines Cmdlet, einer Funktion,
einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der
Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ Connect-MicrosoftTeams
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-MicrosoftTeams:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[Excuse the German: It reads: The name was not recognized as cmdlet or name of a function. But you probably know the message if you use PS]
Now, my question is: How can I get PS to recognize the command and how do I find out where the error lies? Is there a command to list the currently running scripts and available commands? Or is there a possibility to force the script to be executed?