question

BaiAndy-9844 avatar image
0 Votes"
BaiAndy-9844 asked BaiAndy-9844 commented

Powershell install MicrosoftTeams failed

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


office-teams-windows-itpro
image.png (139.3 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @BaiAndy-9844

Microsoft Teams PowerShell module requires PowerShell 5.1 or higher on all platforms. To troubleshoot this issue, we firstly recommend you check the PowerShell version by running the following command:

$PSVersionTable.PSVersion

In addition, please also make sure you are "run as the administrator" when you are running PowerShell.

0 Votes 0 ·

Issue has been fixed. Thanks.

0 Votes 0 ·

Hi @BaiAndy-9844

You' re welcome! Could you share with us your solution about this issue?


0 Votes 0 ·

1 Answer

BaiAndy-9844 avatar image
1 Vote"
BaiAndy-9844 answered JimmyYang-MSFT commented

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

133077-image.png



image.png (3.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@BaiAndy-9844

Thanks for your sharing!

Meanwhile, please try to mark it as an answer to close the thread, it will help others who encounter the same issue and read this thread.
Thank you for your understanding and patience!

0 Votes 0 ·