Make your Sitecore life easier with PowerShell Extensions
If you're looking to reduce the time taken in delivering Sitecore Solutions, PowerShell Extensions (SPE) might just be the tool for you. Thanks to these extensions, you can now ensure faster Sitecore deliveries with fewer roadblocks. But what exactly are PowerShell Extensions and how do they work? Let's find out!
The Sitecore PowerShell Extension is a module that is tailored to automate your tasks in a command line and scripting environment. The Extension works in conjunction with the various Sitecore processes to manipulate files, initiate calls to Sitecore’s API, and do much more. When it comes to writing scripts or executing a command, it follows the standard PowerShell Syntax of Windows.
Over the last couple of years, SPE has evolved as a leading tool for IT server management, and in the following sections, we will take a closer look at its features and benefits.
What Does it Offer?
If you’re wondering what the Sitecore PowerShell Extensions offer, here’s what you need to know. In the following list, you’ll find some useful modules that come with SPE.
- Enables you to build a new site from the sitemap
- Allows access to Authorable reports
- It comes with an Index on Demand tool and Task management tool
- Helps with Media Library and System Maintenance
- Helps generate Content reports
- Assists with Remoting
Installing the Sitecore PowerShell Extension
Now that you have a basic idea of what Sitecore PowerShell Extension is and how it works, let’s take a closer look at the installation guidelines.
What Will I Need?
Your operating system should be Windows 7 or higher.
.Net Framework version 4.5 or higher.
Windows Management Framework version 3 or higher.
How to Install Sitecore PowerShell Extension?
Since the Sitecore PowerShell Extensions Module isn’t a part of the basic installation process of Sitecore, you need to manually install it from Sitecore’s Marketplace. Alternatively, you can also download it from the Github ‘Releases’ page (Github Sitecore PowerShell).
Once downloaded, you can install the Sitecore Package using the installation wizard. Once installed, you will find a couple of new items in your Sitecore dashboard. These include the PowerShell Console, Toolbox, ISE, and Reports. Over the next couple of sections, we’ll discuss what these features do and the benefits they come with.
The console is probably best defined as a Command Line Interface that makes your Sitecore operations more efficient. It streamlines your operations with both Sitecore and PowerShell.
The Toolbox allows you to access scripts that have been frequently used by you. You will find the PowerShell Toolbox after clicking ‘Sitecore’ on the dashboard. Upon selecting the toolbox, you will get a list of your recently configured scripts. Additional features of the toolbox include:
Index Viewer: as evident from the name, this feature helps you search and re-create an index as and when needed.
Session Manager: This will give you a list of logged-in users at the current session. You can keep the necessary resources and remove others instantly.
Reporting: You can now generate rule-focused reports with Sitecore’s dedicated Rules engine.
Background Session Manager: This tweak helps you access the active SPE sessions. As with the session manager, here too you have the option of removing unnecessary resources.
Recreate a site: SPE allows you to re-build a website from its original sitemap.
Task Manager: This feature lets you access and manage your existing tasks.
PowerShell Integrated Scripting Environment (ISE)
The ISE is one of the best ways to collectively group commands and save them for using later. You can use this feature to open existing scripts, save scripts, save a copy of a new script, reload a script, run an active script in the background, run a specific text of your script, debug scripts, stop executing a certain script, insert breakpoints, change your current database and/or user, and much more.
PowerShell's advanced content reports offers useful details about the installation of Sitecore. Here are some specifics you should be familiar with before using this feature.
You can find custom content reports by clicking the ‘PowerShell Reports’ option under the ‘Reporting Tools’ tab. After the report is completed, you will find the updated results in a new window.
Note that although the PowerShell Extension contains multiple reports, they aren’t necessarily identical to the reports from the Advanced System Reporter.
Security and Access Reports
You might want to share the reports with the authors of the content. Follow the next couple of steps to grant them access.
- Click the
PowerShell Reportstab under the ‘Reporting Tools’ option.
- Now navigate to:
/Sitecore/content/Documents and Settings/All users/Start menu/Right/Reporting Tools/PowerShell Reports
- You will now get an option for granting access to the content authors. This is available through the
Sitecore Client Authoringfeature.
- Now verify whether the content authors can access the reports.
SPE and Reporting
If you’ve been working on .NET for the last couple of years, you’re probably familiar with the basics of reporting. But when it comes to SPE, remoting has an entirely new definition. Here, the process is more about remotely running scripts.
The idea is simple. You need to choose a script, serialize it, and send it for running remotely to the Sitecore server. The process is simpler and significantly faster.
How Does it Help?
While it may not appear at the outset, using SPE as a reporting tool will give you the ‘much needed’ power to internally assess and maintain multiple instances. One of the key takeaways would be in the realm of Continuous Integration. Thanks to SPE’s advanced reporting feature, you’ll now have complete access to a tool that manages and fine-tunes content as and when needed.
Additionally, you can also access the servers, upload new files, download existing files, and tweak the permissions for different users. The process becomes much faster since you can now automate regular processes like downloading logs from multiple servers.
If you want to make the most of your IT administration possibilities, Sitecore’s PowerShell Extension is an ideal tool. It won’t just automate processes, but it’ll also make Sitecore more accessible and easier to use.