Skip to content

Export PnPConnection for later use #418

Answered by erwinvanhunen
kmbdsz asked this question in Q&A
Discussion options

You must be logged in to vote

The connection contains relevant information for the moment of time it's been created. While you can reuse within the same session, it will not work when you span PowerShell sessions. The reason for this is that we have a very complex hierarchy and dependencies to other libraries in that object. If you want to run a script as a scheduled task, the only way forward would be to create an Azure AD App registration and run your script with -ClientId and -Certificate.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by veronicageek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants