Forum Discussion
Shawn Beckers
Dec 21, 2020Brass Contributor
Manual Install of Teams PowerShell Module?
Instead of using Install-Module to install the latest version (1.1.6) of the Teams PowerShell module, is it possible to download the NUPKG file and manually install? I would like to install the module on a machine that has limited access to external sites and adding the PowerShell Gallery to that list is not an option at the moment. I've attempted to use the instructions at the link below but doing so results in a bunch of "could not load file or assembly" errors when attempting Import-Module MicrosoftTeams. Is a manual install even possible?
In order to create replica of the list (Without data), you can use OOTB option shown in below screen shot:
In order to copy existing data from source to destination list you can use below PowerShell script to do so which uses PnP.PowerShell
You still need to update field names in below script according to your list.$sourceWebUrl = "https://contoso.sharepoint.com/sites/SourceSite" $destinationWebUrl = "https://contoso.sharepoint.com/sites/DestinationSite" #Connect to source site Connect-PnPOnline -Url $sourceWebUrl -Interactive $listName = "AssetTypeMaster" $fields = "AssetType", "Description", "AseetTypeDescription" #Retrieves items $listItems = Get-PnPListItem -List $listName -Fields $fields #Write lists item to other list #Connect to destination site Connect-PnPOnline -Url $destinationWebUrl -Interactive foreach($listItem in $listItems) { $itemValues = @{ "AssetType" = $listItem["AssetType"]; "Description" = $listItem["Description"]; "AseetTypeDescription" = $listItem["AseetTypeDescription"] } Add-PnPListItem -List $listName -Values $itemValues }
For syncing of the data between these two lists, there is not OOTB way but you could use Power Automate to do so. Following is the reference link to do so.
- https://sharepains.com/2021/12/17/synchronize-two-data-sources-power-automate/
- https://tomriha.com/how-to-synchronise-two-sharepoint-lists-with-power-automate/
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
4 Replies
Sort By
- Evgeny_VolkovCopper Contributor
I faced the same issue and found a way to resolve it.
You must to rename Folder, where reside module files (e.g. MicrosoftTeams.psd1, LICENSE.txt, GetTeamSettings.format.ps1xml and so on) to MicrosoftTeams.
After that you will be able to import module, which was downloaded from powershellgallery and extracted, locally.
Hope it helps you and other members.
- Hi Shawn Beckers
As per the docs articles it is recommended to install it via the shell session. Run as administrator and then
Install-Module MicrosoftTeams -RequiredVersion "1.1.6"
You could download the .nupkg file from the Powershell Gallery, get it onto the machine via removable media or cloud storage, then use a combination of the docs articles together with videos such as this to extrapolate how to install manually
https://www.youtube.com/watch?v=HEWxChLAMQk
As per the docs article, it is not recommended, so would do it via the shell session
Hope that answers your question
Best, Chris- Shawn BeckersBrass Contributor
Thanks for the suggestion ChrisHoardMVP. Unfortunately the process demoed in YouTube video, copying the module from one machine to another, doesn't seem to work for the latest Teams PS module. Our security team is currently rejecting my request to allow the machines which would use the module to have access to the PowerShell repository required for installation. Since I only require a few of the commands this module provides I guess I'll look at using the Graph API instead.
- Hi Shawn Beckers
For sure. Graph - or, another way around since I myself am not allowed to install modules on my local machine for exactly the same reasons, is to spin up a VM on Azure and do it that way.
Best, Chris