2
<DocumentTemplate TargetName="/_layouts/CreatePage.aspx" />    

How could I set this using powershell?

$dst = [Microsoft.Office.DocumentManagement.DocumentSets.$dst.Update($true)]::GetDocumentSetTemplate("/_layouts/CreatePage.aspx")

$dst.Update()

1 Answer 1

2

Maybe this will help?

#Upload new document template file from computer
$newTemplateFile = Get-ChildItem "C:\LocalPath\Test Document.dotx"
$templateFolderPath = $web.Url + "/" + $list.RootFolder.Url + "/Forms"
$templateFolder = $web.GetFolder($templateFolderPath)
$uploadPath = $templateFolder.Url + "/" + $newTemplateFile.Name
$spNewTemplateFile = $templateFolder.Files.Add($uploadPath, $newTemplateFile.OpenRead(), $true)

#Change list setting to the template file uploaded
$list.DocumentTemplateUrl = $uploadPath
$list.Update()

Ref: updating template.doc in a sharepoint 2010 document library via powershell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.