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()
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, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.