Closed AlyaKoni closed 1 year ago
I had the same issue when I used Az, if I connected with Az first I got this error connecting to SharePoint. If I connected to SharePoint with Connect-PnPOnline first, I didn't have this issue. I suspect they are both depending on different versions of same .dlls, and the order of loading is important. See also https://github.com/pnp/powershell/discussions/3193
I have the same issue every time after an install. Works first time, but close session and restart I get the same error. Can clean up by uninstalling module and reinstalling but then repeats. Version 2.2.0 or the latest nightly have same behavior.
PS C:\Users\SRV-QlikView> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Thanks for reporting the issue. Have improved the check for the site collection via https://github.com/pnp/powershell/pull/3337, please test it out with tomorrow's nightly build and let us now if the issue still exists.
It will also be available in the next major version whenever we release it.
Reporting an Issue or Missing Feature
Issue
Expected behavior
Connection works as in the past
Actual behavior
PowerShell version
What is the version of the Cmdlet module you are running?
Other loaded modules
Which operating system/environment are you running PnP PowerShell on?