Closed pettersh closed 7 years ago
Love this idea, @pettersh.
We might have to do a PR though since I get the following error when attempting to apply a template residing on GitHub.
Apply-PnPProvisioningTemplate : The remote server returned an error: (422) Unprocessable Entity.
cc @tarjeieo
I think that currenly the pnp file must reside in a SharePoint library.
Any input on this @wobba?
Right now it tries to load the file as an SPFile. It could try to load using a http request. Easiest would be to use default credentials for a user, as more complex auth scenarios quickly becomes complicated.
The easy workaround is to fetch the file from github first, then apply from the local copy.
Invoke-WebRequest -UseBasicParsing -Uri https://server/pathv1.11.4.pnp -OutFile v1.11.4.pnp
Apply-PnPProvisioningTemplate -Path ./v1.11.4.pnp
Thanks @wobba.
What do you think @pettersh? Is this good enough?
The pnp files can be added to the release (example : https://github.com/Puzzlepart/prosjektportalen/releases/tag/v1.13.0)
And then you'll do this if you want to apply the root template:
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/Puzzlepart/prosjektportalen/releases/download/v1.13.0/root.pnp -OutFile root_v1.13.0.pnp
Apply-PnPProvisioningTemplate .\root_v1.13.0.pnp
Good enough for now @olemp
Good enough for now @olemp
I don't like this approach, as it only creates confusion about what files to download. When is this ever useful? I think we should remove them.
That makes sense @tarjeieo
The releases become quite messy.
Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your needs please complete the below template to ensure we have the details to help. Thanks!
Category
[x] Enhancement
[ ] Bug
[ ] Question
Environment
[x] SharePoint Online [x] SharePoint 2013
Summary
Consider adding pnp packages to the releases (not wrapped in zip files) to support remote provisioning, and also ease integration from Azure Functions, WebJobs and other hosted provisioning code.
Example:
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/projects Apply-PnPProvisioningTemplate -Path https://github.com/Puzzlepart/prosjektportalen/archive/v1.11.4.pnp
This approach may also ease automated deployments and release management (of non-customized deployments)
Version
Please specify what version ou are using: [ ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Expected / Desired Behavior / Question
If you are reporting an issue please describe the expected behavior. If you are suggesting an enhancement please describe thoroughly the enhancement, how it can be achieved, and expected benefit. If you are asking a question, ask away!
Observed Behavior
If you are reporting an issue please describe the behavior you expected to occur when performing the action. If you are making a suggestion or asking a question delete this section.
Steps to Reproduce
If you are reporting an issue please describe the steps to reproduce the bug in sufficient detail to allow testing. If you are making a suggestion or asking a question delete this section.