# Copy Search Schema

Copies the search schema (managed properties, aliases, crawled properties) from one SharePoint site to another by processing rows from an Excel file.

Filename pattern: filename must contain CopySearchSchema (case-insensitive).
Example: 20240115 CopySearchSchema migration.xlsx

# Columns

Name Required Description
Origin Yes Full URL of the source site to copy the search schema from.
Target Yes Full URL of the target site to apply the search schema to.
Force No Boolean. When false (default), the row fails if the target already has a non-empty search schema. When true, the existing target schema is overwritten.
CreateCrawledProperties No Boolean. When true, crawled properties that exist in the origin schema are also created on the target. Defaults to false.
Debug No Boolean. When true, outputs the origin schema XML to the console. For diagnostic use only.

Both Origin and Target are required. The target URL must not contain -admin — using an admin site as the target is explicitly prohibited.

# Behavior

  1. Exports the search schema from Origin.
  2. Exports the current schema from Target (to detect conflicts when Force is false).
  3. If Force is false and the target has any managed properties, aliases, or override properties, the row fails.
  4. Applies the origin schema to the target.
  5. Re-exports the target schema and verifies the import was complete. If any aliases or crawled properties are missing, the row fails with details.
  6. Reports any orphaned aliases (aliases that could not be removed from the target because they are in use).
Last Updated: 4/20/2026, 12:54:05 PM