# 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
- Exports the search schema from Origin.
- Exports the current schema from Target (to detect conflicts when Force is false).
- If Force is
falseand the target has any managed properties, aliases, or override properties, the row fails. - Applies the origin schema to the target.
- Re-exports the target schema and verifies the import was complete. If any aliases or crawled properties are missing, the row fails with details.
- Reports any orphaned aliases (aliases that could not be removed from the target because they are in use).
# Related links
- Site Collection handler — create site collections before configuring search