문제

I can't find powershell command to save list instance as list template (to stp file) or export to stp file?

도움이 되었습니까?

해결책

Calling SPList.SaveAsTemplate via PowerShell should do the trick.

다른 팁

Saving your list as Template

$site = get-spsite("<YourSite>")
$web = $site.RootWeb

$list = $web.Lists["<Your List>"]
$list.SaveAsTemplate(“Template Name”,”Template Title”,”Template Description”,1)

4th Parameter above -> if you want to save the specified site as template along with data use 1, otherwise use 0.

Creating a new list from the template created.

$listTemplates = $site.GetCustomListTemplates($web)
$web.Lists.Add("<List Name>", "<List Desc>",$listTemplates["<Template List Name>"])
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top