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.
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.
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.