security-export-account
Export a Sitecore user or role to the CM filesystem and return the saved file path for backup, migration, or review. Requires SPE 8.0+.
Instructions
Exports (serializes) a Sitecore user or role to the CM's own filesystem and returns the file path. Requires SPE 8.0 or later — earlier versions fail with a NullReferenceException (SPE issues #1369, #1370). On SitecoreAI prefer Sitecore CLI serialization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Exact server-side file to serialize to. Not with root. | |
| root | No | Server-side directory to serialize into. Defaults to Sitecore's serialization folder. Not with path. | |
| identity | Yes | The account to export, e.g. 'sitecore\admin' or 'sitecore\Author'. | |
| accountType | Yes | Whether the identity names a user or a role. |