OfficeDev / microsoft-teams-emergency-operations-center

The Microsoft Teams Emergency Operations Center (TEOC) solution template leverages the power of the Microsoft 365 platform to centralize incident response, information sharing and field communications using powerful services like Microsoft Lists, SharePoint and more.
MIT License
95 stars 40 forks source link

PnP.powershell found but could not be loaded #110

Closed devansinleesburgva closed 1 year ago

devansinleesburgva commented 1 year ago

while performting step 2 in the upgrade instructions (run powershell script)

https://github.com/OfficeDev/microsoft-teams-emergency-operations-center/wiki/Upgrade-to-Latest-Version

When I enter the SharePoint site name I get the following error message: Error Message: The 'Get-PnPTenantSite' command was found in the module 'PnP.PowerShell', but the module could not be loaded. For mo re information, run 'Import-Module PnP.PowerShell'.

TEOC App Upgrade failed.

I am unable to get past this. Any suggestions?

v-prigunasek commented 1 year ago

Hi @devansinleesburgva ,

Have you tried running the below command? Import-Module PnP.PowerShell

In case if you see any issues after running the command, please run the below commands and share us the versions.

$PSVersionTable.PSVersion Get-Module PnP.PowerShell -ListAvailable

devansinleesburgva commented 1 year ago

When I run the Import-Module PnP.PowerShell - I get this:

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

When I run the other commands you gave below I get this:

PS C:\WINDOWS\System32> $PSVersionTable.PSVersion Get-Module PnP.PowerShell -ListAvailable

Major Minor Build Revision


5 1 22621 1778

Name : PnP.PowerShell Path : C:\Program Files\WindowsPowerShell\Modules\PnP.PowerShell\2.1.1\PnP.PowerShell.psd1 Description : Microsoft 365 Patterns and Practices PowerShell Cmdlets Guid : 0b0430ce-d799-4f3b-a565-f0dca1f31e17 Version : 2.1.1 ModuleBase : C:\Program Files\WindowsPowerShell\Modules\PnP.PowerShell\2.1.1 ModuleType : Manifest PrivateData : {PSData} AccessMode : ReadWrite ExportedAliases : {} ExportedCmdlets : {[Add-PnPAdaptiveScopeProperty, Add-PnPAdaptiveScopeProperty], [Add-PnPPropertyBagValue, Add-PnPPropertyBagValue], [Add-PnPSiteClassification, Add-PnPSiteClassification], [Copy-PnPFolder, Copy-PnPFolder]...} ExportedFunctions : {} ExportedVariables : {} NestedModules : {PnP.PowerShell}

Name : PnP.PowerShell Path : C:\Program Files\WindowsPowerShell\Modules\PnP.PowerShell\1.12.0\PnP.PowerShell.psd1 Description : Microsoft 365 Patterns and Practices PowerShell Cmdlets Guid : 0b0430ce-d799-4f3b-a565-f0dca1f31e17 Version : 1.12.0 ModuleBase : C:\Program Files\WindowsPowerShell\Modules\PnP.PowerShell\1.12.0 ModuleType : Manifest PrivateData : {PSData} AccessMode : ReadWrite ExportedAliases : {} ExportedCmdlets : {[Add-PnPAdaptiveScopeProperty, Add-PnPAdaptiveScopeProperty], [Add-PnPPropertyBagValue, Add-PnPPropertyBagValue], [Add-PnPSiteClassification, Add-PnPSiteClassification], [Copy-PnPFolder, Copy-PnPFolder]...} ExportedFunctions : {} ExportedVariables : {} NestedModules : {PnP.PowerShell}

Let me know what needs to be done next.

Thank you,

David A. Evans Senior Systems Administrator Town of Leesburg 703-737-7153: Office 571-440-1108: Cell

From: v-prigunasek @.> Sent: Monday, June 19, 2023 1:37 AM To: OfficeDev/microsoft-teams-emergency-operations-center @.> Cc: David Evans @.>; Mention @.> Subject: Re: [OfficeDev/microsoft-teams-emergency-operations-center] PnP.powershell found but could not be loaded (Issue #110)

Hi @devansinleesburgvahttps://github.com/devansinleesburgva ,

Have you tried running the below command? Import-Module PnP.PowerShell

In case if you see any issues after running the command, please run the below commands and share us the versions.

$PSVersionTable.PSVersion Get-Module PnP.PowerShell -ListAvailable

- Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/issues/110#issuecomment-1596534535, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BARQYYLJAZCGZQWGLNV2Q2DXL7QOBANCNFSM6AAAAAAZJUSSNY. You are receiving this because you were mentioned.

v-prigunasek commented 1 year ago

I see the error is due to the version conflicts. Can you run the below commands in sequence?

Uninstall-Module -Name PnP.PowerShell -AllVersions -Force

Install-Module -Name PnP.PowerShell

Install-Module PnP.PowerShell -RequiredVersion 1.12 -Force

devansinleesburgva commented 1 year ago

After running those commands below (which were successful) and trying to run the powerscript again we are still getting:

Enter your existing TEOC site name: Leesburg EOC PnP.PowerShell module found 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:\pshel\microsoft-teams-emergency-operations-center-main\Deployment\provisioning\Upgrade\Update-EOC-Provision.ps1:26 char:1

Error Message: The 'Get-PnPTenantSite' command was found in the module 'PnP.PowerShell', but the module could not be loaded. For mo re information, run 'Import-Module PnP.PowerShell'.

TEOC App Upgrade failed.

Is there something we can try next??

David A. Evans Senior Systems Administrator Town of Leesburg 703-737-7153: Office 571-440-1108: Cell

From: v-prigunasek @.> Sent: Tuesday, June 20, 2023 9:45 AM To: OfficeDev/microsoft-teams-emergency-operations-center @.> Cc: David Evans @.>; Mention @.> Subject: Re: [OfficeDev/microsoft-teams-emergency-operations-center] PnP.powershell found but could not be loaded (Issue #110)

I see the error is due to the version conflicts. Can you run the below commands in sequence?

Uninstall-Module -Name PnP.PowerShell -AllVersions -Force

Install-Module -Name PnP.PowerShell

Install-Module PnP.PowerShell -RequiredVersion 1.12 -Force

- Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/issues/110#issuecomment-1598822633, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BARQYYLWUYWLYREDIZJPWBTXMGSO7ANCNFSM6AAAAAAZJUSSNY. You are receiving this because you were mentioned.Message ID: @.***>

v-prigunasek commented 1 year ago

Have you tried running Import-Module PnP.PowerShell command? If not, please try that and see if that works. If you see any errors, try to open the PowerShell console as an administrator and try these commands again. Thanks!

devansinleesburgva commented 1 year ago

We ran the upgrade to version 2 but I have a question: Here is a screenshot of what I see when I open the app:

[Graphical user interface, application Description automatically generated]

When I open the Teams EOC tab at the top and click on the Info button I get this (which says version 1.0): BUT when I click on the "about" tab we see this (see below) which indicates Version 2. Did we complete the process correctly?

[Graphical user interface, text, application, email Description automatically generated]

[Graphical user interface, text, application, email Description automatically generated]

David A. Evans Senior Systems Administrator Town of Leesburg 703-737-7153: Office 571-440-1108: Cell

From: v-prigunasek @.> Sent: Tuesday, June 20, 2023 9:45 AM To: OfficeDev/microsoft-teams-emergency-operations-center @.> Cc: David Evans @.>; Mention @.> Subject: Re: [OfficeDev/microsoft-teams-emergency-operations-center] PnP.powershell found but could not be loaded (Issue #110)

I see the error is due to the version conflicts. Can you run the below commands in sequence?

Uninstall-Module -Name PnP.PowerShell -AllVersions -Force

Install-Module -Name PnP.PowerShell

Install-Module PnP.PowerShell -RequiredVersion 1.12 -Force

- Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/issues/110#issuecomment-1598822633, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BARQYYLWUYWLYREDIZJPWBTXMGSO7ANCNFSM6AAAAAAZJUSSNY. You are receiving this because you were mentioned.Message ID: @.**@.>>

v-prigunasek commented 1 year ago

Hi @devansinleesburgva ,

Can you check whether you see 2 or 3 icons in the action column in dashboard. image

If you are seeing only 2 icons, then the app upgrade is not yet completed. Can you revisit this step in the upgrade process, if you have already done with this step then check the logs in the App Service configuration to make sure the latest sync is successful?

If you still have any issues, please share me the screenshot of this logs screen and the dashboard screen from the App for further troubleshooting. Thanks

devansinleesburgva commented 1 year ago

As of right now I see this in the "action" column (2 icons)

@.*** I will revisit the step you reference in the email and follow back up.

Thanks for your assistance,

David A. Evans Senior Systems Administrator Town of Leesburg 703-737-7153: Office 571-440-1108: Cell

From: v-prigunasek @.> Sent: Tuesday, June 27, 2023 1:03 AM To: OfficeDev/microsoft-teams-emergency-operations-center @.> Cc: David Evans @.>; Mention @.> Subject: Re: [OfficeDev/microsoft-teams-emergency-operations-center] PnP.powershell found but could not be loaded (Issue #110)

Hi @devansinleesburgvahttps://github.com/devansinleesburgva ,

Can you check whether you see 2 or 3 icons in the action column in dashboard. [image]https://user-images.githubusercontent.com/98514691/249040560-ca7a8339-7330-42ab-9b8e-7117479b8b88.png

If you are seeing only 2 icons, then the app upgrade is not yet completed. Can you revisit this stephttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/wiki/Upgrade-to-Latest-Version#3-sync-latest-version in the upgrade process, if you have already done with this step then check the logs in the App Service configuration to make sure the latest sync is successful?

If you still have any issues, please share me the screenshot of this logs screen and the dashboard screen from the App for further troubleshooting. Thanks

- Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/issues/110#issuecomment-1608801817, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BARQYYNJFAFGA2UPLWAVIY3XNJSP3ANCNFSM6AAAAAAZJUSSNY. You are receiving this because you were mentioned.Message ID: @.**@.>>

devansinleesburgva commented 1 year ago

What step are you referring to? We only see two columns, but I'm not sure what "step" you are referring to?

David A. Evans Senior Systems Administrator Town of Leesburg 703-737-7153 (desk) 571-440-1108 (cell)


From: v-prigunasek @.> Sent: Tuesday, June 27, 2023 1:02 AM To: OfficeDev/microsoft-teams-emergency-operations-center @.> Cc: David Evans @.>; Mention @.> Subject: Re: [OfficeDev/microsoft-teams-emergency-operations-center] PnP.powershell found but could not be loaded (Issue #110)

Hi @devansinleesburgvahttps://github.com/devansinleesburgva ,

Can you check whether you see 2 or 3 icons in the action column in dashboard. [image]https://user-images.githubusercontent.com/98514691/249040560-ca7a8339-7330-42ab-9b8e-7117479b8b88.png

If you are seeing only 2 icons, then the app upgrade is not yet completed. Can you revisit this stephttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/wiki/Upgrade-to-Latest-Version#3-sync-latest-version in the upgrade process, if you have already done with this step then check the logs in the App Service configuration to make sure the latest sync is successful?

If you still have any issues, please share me the screenshot of this logs screen and the dashboard screen from the App for further troubleshooting. Thanks

— Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/microsoft-teams-emergency-operations-center/issues/110#issuecomment-1608801817, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BARQYYNJFAFGA2UPLWAVIY3XNJSP3ANCNFSM6AAAAAAZJUSSNY. You are receiving this because you were mentioned.Message ID: @.***>

v-prigunasek commented 1 year ago

Hi @devansinleesburgva ,

I was referring to the step 3 (Sync to latest version) in the Upgrade to Latest version wiki file.

I would recommend to view/respond to the GitHub notifications from the repo instead through an email, since it might not show up all links and images in the email. Thanks!

devansinleesburgva commented 1 year ago

So we ran step 3 in the re-deployment effort again and the synch failed. I am attaching the file log with the details. TEOC Update Failure log.txt

Here is my question at this point. Would it be easier for us to remove the entire app ( we have just used it for testing at this point) and start from scratch? If so could you let us know exactly what we have to delete and then directions from adding version 2 from scratch? TEOC Update Failure log.txt

v-prigunasek commented 1 year ago

Yes, you can remove everything (App registration, Resource group, SharePoint site, Teams app from teams admin center) and start the deployment process from scratch by following this wiki guide. This process will install the 2.0 version of the app.