Export PnPConnection for later use #418
-
Hey guys,
After importing the Object, it seemed pretty good - but at a second look the imported object is from another type. With this in mind - I tried to fire Get-PnPList -Connection and dealing with this issue: Do you have any idea in mind? Please help me out. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.