Closed tcrobbins4 closed 1 year ago
Hi @tcrobbins4 ,
Thanks for reaching out to us. Can you please try to run the script using Windows PowerShell instead of SPO Management Shell and let me know if you are still facing any issues?
Stand by and I will do this. I believe I already did try in Windows Powershell which is what prompted my assumption that it be done in the SPO Management shell. I will get back to you in a day or so.
Solved with this process - Uninstall all versions and then install correct 1.12.0 version. Newer version PnP PowerShell 2.1.1 has issues #1. This issue happened with newer version PnP PowerShell 2.1.1. So uninstall all PnP.Powershell versions. No need to reboot machine Uninstall-Module PnP.PowerShell -AllVersions #2. Set Tls12 protocol [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #this setting already present [Net.ServicePointManager]::SecurityProtocol #3. Install NuGet Install-PackageProvider -Name nuget -MinimumVersion 2.8.5.201 -force #4. Install PnP.PowerShell with version 1.12.0 Install-Module -Name "PnP.PowerShell" -RequiredVersion 1.12.0 -Force -AllowClobber
Execution of the ps.1 was successful in Windows Powershell
1) I assume the steps for deployment should be done in the SharePoint Online Mangement shell? 2) During the execution of EOC-provision.ps1 it says PNP.POWERSHELL is not installed and it attempts to install it. It throws the following error halfway thru.
Connect-PnPOnline : The 'Connect-PnPOnline' command was found in the module 'PnP.PowerShell', but the module could not be loaded. For more information, run 'Import-Module PnP.PowerShell'. At C:\eoc\microsoft-teams-emergency-operations-center-main\Deployment\provisioning\EOC-Provision.ps1:30 char:1
Any ideas? I did an import-module as recommended and the following error is shown:
import-module : Could not load file or assembly 'System.Management.Automation, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. At line:1 char:1