security-export-account
Exports a Sitecore user or role to the CM filesystem and returns the saved file path. Requires SPE 8.0 or later; on SitecoreAI, use Sitecore CLI serialization instead.
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. |