This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
Apply-PnPProvisioningTemplate response #2843
-
Hi, Is there a way to get response after calling Apply-PnPProvisioningTemplate? Such as success or errors. Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
erwinvanhunen
Aug 20, 2020
Replies: 1 comment 1 reply
-
you can turn on logging if you want to: Set-PnPTraceLog -On -LogFile c:\pathtoyourfile.txt
Apply-PnPProvisioningTemplate -Path yourfile.xml
Set-PnPTraceLog -Off If an error occurs, an exception will be thrown by the engine, which you can retrieve with Get-PnPException If you want more detailed control over the output of the provisioning engine, you will have to call it yourself from .NET code, which is effectively what PnP PowerShell is doing to. The provisioning engine is located in the PnP Sites Core project: https://github.com/pnp/pnp-sites-core. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cwalexlai
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can turn on logging if you want to:
If an error occurs, an exception will be thrown by the engine, which you can retrieve with
Get-PnPException
If you want more detailed control over the output of the provisioning engine, you will have to call it yourself from .NET code, which is effectively what PnP PowerShell is doing to. The provisioning engine is located in the PnP Sites Core project: https://github.com/pnp/pnp-sites-core.