SitecoreCommander is a tool designed for managing Sitecore instances, typically utilized by developers and administrators working with the Sitecore Content Management System (CMS). It helps in performing various administrative tasks by Using the API's. See Using the Sitecore APIs with Sitecore Commander
For Sitecore XM Cloud and Sitecore 10.3+
SitecoreCommander and Visual Studio, providing a powerful scripting and automation framework for managing Sitecore environments. It allows developers and administrators to execute complex scripts and manage long-running tasks efficiently within Sitecore.
While SitecoreCommander offers a lot of possibilities, please be aware that this is the first version of the tool. For many functionalities, there isn't pre-existing code available, and you may need to add or customize the code yourself to meet your specific needs.
-
Utilize the full power of Visual Studio for programming in C# and executing Sitecore tasks. Benefit from Visual Studio’s advanced debugging features to troubleshoot and refine scripts. Complex Script Management:
-
Handle more intricate scripts that require extensive logic or need to run over extended periods. Automate repetitive tasks, saving time and reducing the potential for human error. Enhanced Security:
-
For security reasons, Sitecore PowerShell Elevation is recommended only for local environments. SitecoreCommander mitigates these security concerns by only using various Sitecore APIs.
- Run long-running tasks without the hassle associated with traditional PowerShell scripting within Sitecore. Optimize task management, ensuring that resource-intensive operations are handled smoothly.
- Tools like Postman, Firecamp.dev or GraphQL Playground are excellent for making single API calls to Sitecore, useful for testing and debugging. SitecoreCommander is ideal for scenarios requiring multiple API calls and complex scripting, offering a more robust solution for automation. Contain code for Authoring, Edge and RESTful Sitecore API.
- Automate the creation, update, and deletion of content items in bulk, making it easier to manage large volumes of content.
- Script deployment processes and configuration changes to ensure consistency across multiple Sitecore instances.
- Schedule and run maintenance scripts, such as cleaning up old versions or reindexing, to keep the Sitecore environment healthy.
- Automate the import and export of data between Sitecore and other systems, streamlining integration processes.
- use the Sitecore CLI to create a valid user.json (when you have multiple organisation, be sure you use the right organisation when connection to a non local XM Cloud)
- edit the Config.cs and supply the values for your Sitecore
- edit the Program.cs and create the code you need.
- For the Authoring API, use the Sitecore CLI to log in, enabling user-based authentication with roles and permissions. In contrast, the Automation Client is designed for automated processes, using a service account that operates without user-specific access control.
- 19 July initial version with Remove Language/Version from a single item or a Tree of items
- 9 August Added a move item methode and Move SubItems methode including an exclude option
- 19 August Added RESTful API and an example of how to migrate a page item from an old Sitecore with REST api to XM Cloud with GraphQL
- 24 August Added methodes to read and write item security and getSites methode
- 15 September Added methodes to help limiting the number of items under any given node to 100 or less, by moving to multiple subfolders
- 8 November Added UnpublishLanguageFromSubtree
- 18 November Added generiek create item
- 23 May 2025 Added AddMedia, Delete Item and Delete Subitems Except
- 9 june 2025 Added WordPress to Sitecore Import Example
- 11 july 2025 Added Replace Field method
Tip for search on authorings API you are depend on the SOLR index, especially when you are working local check on error like:
GraphQL returned errors:
- Solr schema is not populated for index 'sitecore_master_index'.
Be sure you update is populated and fully indexed when using the search.