Skip to main content
added 4 characters in body
Source Link

Many/most/all PnP SharePoint cmdlets do seem to require that the web you're working with match the one last referenced in the call to Connect-PnPOnline. Making two Connect calls and assigning each to a var does not seem to work for context switching between webs. Explicitly setting the Connection parameter in a call may still be a good idea to help trigger an error when a connection isn't available - the cmdlet does then seem to always return a null and the cmdlet will fail.

Hope this helps! -e.

Many/most/all PnP SharePoint cmdlets do seem to require that the web you're working with match the one referenced in the call to Connect-PnPOnline. Making two Connect calls and assigning each to a var does not seem to work for context switching between webs. Explicitly setting the Connection parameter in a call may still be a good idea to help trigger an error when a connection isn't available - the cmdlet does then seem to always return a null and the cmdlet will fail.

Hope this helps! -e.

Many/most/all PnP SharePoint cmdlets do seem to require that the web you're working with match the one last referenced in the call to Connect-PnPOnline. Making two Connect calls and assigning each to a var does not seem to work for context switching between webs. Explicitly setting the Connection parameter in a call may still be a good idea to help trigger an error when a connection isn't available - the cmdlet does then seem to always return a null and the cmdlet will fail.

Hope this helps! -e.

Source Link

Many/most/all PnP SharePoint cmdlets do seem to require that the web you're working with match the one referenced in the call to Connect-PnPOnline. Making two Connect calls and assigning each to a var does not seem to work for context switching between webs. Explicitly setting the Connection parameter in a call may still be a good idea to help trigger an error when a connection isn't available - the cmdlet does then seem to always return a null and the cmdlet will fail.

Hope this helps! -e.