How to Import/Export Custom Content Types in SharePoint 2010 using Powershell
Let us first create two files of which the file names and content will be as follows: 1. File Name: CTypes.ps1. This file contains the script to export existing site content types (From: http://apps-d/myApp and Content types group: My Custom Content Types ) into an XML script (To: D:\Development\SharePoint\MYAPP\Scripts\Script-SiteContentTypes.xml) $sourceWeb = Get-SPWeb http://apps-d/myApp $xmlFilePath = "C:\Script-SiteContentTypes.xml" #Create Export File New-Item $xmlFilePath -type file -force #Export Content Types to XML file Add-Content $xmlFilePath " " Add-Content $xmlFilePath "`n " $sourceWeb.ContentTypes ForEach-Object { if ($_.Group -eq "My Custom Content Types") { Add-Content $xmlFilePath $_.SchemaXml } } Add-Content $xmlFilePath " " $sourceWeb.Dispose() 2. File Name: Import.ps1. This file contains the script to import the content types into http://206137l/MyApp from XML script (To: C:\Script-SiteContentTypes.xml) $destWeb = G...