Automating SharePoint Administration
For all you SharePoint Administrators, how nice would it be to just automate all things you do, from permission settings, backups, issue resolution to all the 50 million things you do. Well did you know that you can really do that, just by changing the way we all work. In reality there are a few options available to us for automation, we will discuss each one and the pros and cons.
June 19, 2017
For all you SharePoint Administrators, how nice would it be to just automate all things you do, from permission settings, backups, issue resolution to all the 50 million things you do. Well did you know that you can really do that, just by changing the way we all work.
In reality there are a few options available to us for automation, we will discuss each one and the pros and cons.
Batch Files
I am sure you all remember these, the old skool way of creating something to automate a task. A simple yet powerful text file that contains various commands for the system we are connecting to. Back in the previous versions of SharePoint (2003, 2007 and even 2010) when we use “PSConfig” instead of PowerShell, these were the best things to use. Learning the “stsadm” commands, what we could do with them, and then creating either maintenance tasks or issue resolution would make our lives easier.
This approach worked even better when we joined them with a scheduled ability such as Scheduled Tasks in Windows or some other approach. The only limitation here was really down to the things that you could manage, “stsadm” was not as feature rich as we needed, and coding batch files was not the easiest task either.
PowerShell Scripts
Welcome to the new world and probably the better approach for automation. PowerShell was introduced into various Microsoft products over the past few years. Of course, when it first hit SharePoint, what you could do was limited but more features and functions have been added since then. PowerShell was designed for this very purpose, administration of systems like SharePoint.
SharePoint both On-premises and in the Cloud, contain many cmdlets that can be used not just for configuration but also for administration. Creating PowerShell scripts, effectively replaces the need for batch files, as the tooling is significantly better, especially using the ISE for creating them. What’s even better is the ability to load in any other DLL, and access it’s methods and functions making PowerShell amazingly powerful.
Azure Functions
In a previous post, we talked about Azure functions and how they can be used within SharePoint. However, Azure functions have a lot more power than just being used with SharePoint. Azure Functions is a service available to us that we can use to publish custom API code to. Azure Functions support specific security and request routing. We have the ability to define triggers which a particular function will respond to, such as a web request or a queue message.
We could if needed, create our own API code that interacts with SharePoint On-premises or Online, that when we call it using the Standard HTTP requests, will perform some administration actions or perform various tasks. This would mean we would need to simply know the HTTP URL, pass in what we needed as parameters and it would run. Of course, this would mean we would need to actually create the code first to use it. We could if needed combine these with PowerShell requests, that are setup as scheduled tasks within Windows.
Custom Code Solutions
This is similar to the Azure functions, although this would be a solution that we have created and is available within our organization. When building a custom solution, we can make it do whatever we need. Hooking into the core DLL’s that SharePoint uses for On-premises and Online means we can make the custom application do exactly what we want.
There are many utilities available online from various sources which are little applications that people have created to help in automating and administration for SharePoint. Once again though this requires someone to build the code needed, and then of course maintain it for every change and version that comes out.
3rd Party tools
Now we could not look at the options without including solutions built by 3rd party vendors. This space is saturated with many different types of tools, from Migration, Backups, Administration to customization tools. The advantage of using a 3rd Party is that they are normally backed by a larger team that ensure the product is kept up to date with versions and managed, so what you get a polished application. However, the downside in reality can be cost, but remember when comparing to the other options, in the long term they could still be cheaper.
These types of tools, tend to have scheduling processes built in too, that can make your life easier when managing both On-premises and Online.
All in all, automating administration of SharePoint, is a personal choice of what you need. I have seen administrators steer clear of 3rd Party tools, I think on principle of having the ability to create scripts. I am a great advocate of scripting as I personally like to know what the code or application is doing, but remember you also have an SLA to meet and an application that already does it could be the better approach.
About the Author
You May Also Like