我刚刚开始使用 SharePoint 2010(你可以说有点晚了!)我已经通过 GUI 创建了一个列表,就像我通常使用 SharePoint 2007 一样。然后我将使用 Gary la pointe stsadm 扩展来提取字段 XML 并将它们放入 Visual Studio 中的功能中。
我想知道这还能完成吗!我在 2010 stsadm 命令中找不到 gl-Exportsitecolumns 命令!
有 powershell 替代方案吗?
任何帮助或指导将不胜感激。
干杯 特鲁兹
最佳答案
我不知道 powershell 中有这样的替代方案。但非常简单的解决方案可以是这段代码:
$w = Get-SPWeb http://localhost/subweb
$w.Fields | select SchemaXml # option 1: prints all xml to console
$w.Fields | select schemaxmlwithresourcetokens # option 2: the same, but with resource tokens
$w.Fields | %{ $_.schemaxml } | out-file c:\temp\fields.xml -encoding unicode #option 3: saves output to text file
关于visual-studio-2010 - SharePoint 2010 将网站字段导出到 XML 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10531354/