【发布时间】:2014-10-05 14:10:44
【问题描述】:
我正在使用 SharePoint 2013,我想从网站模板创建一些 spweb...
我创建了一个站点并添加了我想要的内容并将该站点保存为模板,然后转到解决方案库并下载了.wsp 文件。
现在,我需要创建一个包含一些基于该模板的子网站的新网站集,为此我认为需要将 .wsp 文件上传到解决方案库,就像我可以找到新保存的模板一样,我需要从 PowerShell 中执行此操作!
我尝试了两种方法,
首先,
我尝试添加-spsolution 并安装-spsolution,如下所示
Add-SPSolution -LiteralPath $SPIntranetTemplateFilePath
Install-SPSolution -Identity SPITemplateFile.wsp -CompatibilityLevel 15 -force
但我在解决方案库中没有找到 .wsp,并且模板不在模板列表中...
我尝试使用 Install-SPWebTemplate,但此命令在我的 PowerShell 中未被识别为 cmdlet(我已添加 Add-PSSnapin Microsoft.SharePoint.PowerShell)
这个我也用过
## SharePoint DLL
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
谁能帮助我使用我的 WspFile,就像我可以根据我的模板创建子网站一样?
【问题讨论】:
标签: powershell sharepoint-2013 wsp sitetemplate