visual-studio-2010 - SharePoint 2010 将网站字段导出到 XML 文件

标签 visual-studio-2010 powershell sharepoint-2010 stsadm

我刚刚开始使用 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/

相关文章:

sharepoint-2010 - 如何开始使用 Sharepoint 2010?

visual-studio-2010 - 调试后删除项目引用

svn - 确定本地文件夹使用的源代码管理系统(Subversion 或 TFS)

powershell - 将 key 发送到 PowerShell 中打开的窗口

powershell - 如何通过 PowerShell 获得注册表项的所有权?

sharepoint-2010 - 使用 CRM SDK 中的文档管理的 CRM 2011 和 SharePoint

visual-studio-2010 - VS2010 上的 Microsoft.VisualStudio.TestTools.UnitTesting 命名空间在哪里?

c++ - OpenMP:Visual C++ 2008 和 2010 之间的巨大性能差异

visual-studio - Visual Studio 2010没有 “join lines”键盘快捷键吗?

visual-studio-2010 - 调试 SharePoint 2010 Web 部件时出现问题