Powershell install MicrosoftTeams failed

Bai, Andy 241 Reputation points
2021-09-10T05:48:36.423+00:00

Dear All,

I am trying to install MicrosoftTeams by powershell with the following command "Install-module MicrosoftTeams -Force -Verbose", i am facing the following errors. Any workaround to fix this issue? Thanks.
PS C:\WINDOWS\system32> install-module MicrosoftTeams -Force -Verbose
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='MicrosoftTeams'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'MicrosoftTeams'.
VERBOSE: Performing the operation "Install-Module" on target "Version '2.5.1' of module 'MicrosoftTeams'".
VERBOSE: The installation scope is specified to be 'AllUsers'.
VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'MicrosoftTeams' with version '2.5.1' from the repository 'https://www.powershellgallery.com/api/v2'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='MicrosoftTeams'' for ''.
VERBOSE: InstallPackage' - name='MicrosoftTeams', version='2.5.1',destination='C:\Users\abai\AppData\Local\Temp\518033102'
VERBOSE: DownloadPackage' - name='MicrosoftTeams', version='2.5.1',destination='C:\Users\abai\AppData\Local\Temp\518033102\MicrosoftTe
ams.2.5.1\MicrosoftTeams.2.5.1.nupkg', uri='https://www.powershellgallery.com/api/v2/package/MicrosoftTeams/2.5.1'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/MicrosoftTeams/2.5.1'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/MicrosoftTeams/2.5.1'.
VERBOSE: Completed downloading 'MicrosoftTeams'.
VERBOSE: Hash for package 'MicrosoftTeams' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='MicrosoftTeams', version='2.5.1',destination='C:\Users\abai\AppData\Local\Temp\518033102'
VERBOSE: Validating the 'MicrosoftTeams' module contents under 'C:\Users\abai\AppData\Local\Temp\518033102\MicrosoftTeams.2.5.1' path.
VERBOSE: Test-ModuleManifest successfully validated the module manifest file 'C:\Users\abai\AppData\Local\Temp\518033102\MicrosoftTeams.2.5.1'.
VERBOSE: Validating the authenticode signature and publisher of the catalog file or module manifest file of the module 'MicrosoftTeams'.
VERBOSE: Catalog file 'MicrosoftTeams.cat' is not found in the contents of the module 'MicrosoftTeams' being installed.
PackageManagement\Install-Package : The module 'MicrosoftTeams' cannot be installed or updated because the authenticode signature of the file
'MicrosoftTeams.psd1' is not valid.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34

  • ... talledPackages = PackageManagement\Install-Package @PSBoundParameters
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
  • FullyQualifiedErrorId : InvalidAuthenticodeSignature,ValidateAndGet-AuthenticodeSignature,Microsoft.PowerShell.PackageManagement.Cmdlets.Install
    Package

130940-image.png

Microsoft Teams Microsoft Teams for business Other
{count} votes

Accepted answer
  1. Bai, Andy 241 Reputation points
    2021-09-17T08:52:42.447+00:00

    I am trying use the following command to fix this issue.

    133077-image.png

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.