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

How could I set this using powershell?

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


1 Answer 1


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

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.

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