Question

I've got a .NET core application that run fine from a command prompt that creates SharePoint Sites and adds content types from templates. When I schedule it to run via Windows Scheduled Tasks with the same account it fails with the following error:

Error applying client template: The Provisioning Template URI "MyTemplate.xml" is not valid.

The "client template" is the site collection template

What would cause it to not run properly when scheduled?

Était-ce utile?

La solution

It's not finding the file because the scheduled task is not looking in the folder you expect it to.

Autres conseils

You may want to check out this link: How to get list of available custom template name using powershell script

If the template you are using is not one of the templates that are used by default it may cause some issues when calling on the template.

I use pnp PowerShell tools to find info about the available templates and their names. Hope this helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top