Welcome to SPO Scripts – your source of high quality PowerShell Scripts about M365 and SharePoint.
PowerShell is the language when it comes to automation of Microsofts collaboration products. In this blog I want to show you step by step how you can automate things with SharePoint PowerShell scripts. My aim is to democratize the automation so everybody can make their processes more efficient.
If you have any cases, where you think I should set up a blog post or you have feedback for me, contact me. I appreciate it.
In this Blog I am writing about SharePoint Server, SharePoint Online, Windows PowerShell and Azure AD.
Jump directly to the categories
Latest Posts – SharePoint PowerShell scripts
- How to upload files to SharePoint using Graph API (PowerShell)Uploading files to SharePoint is a common use case, when we are integrating 3rd party systems with SharePoint. In my previous articles, I have been explaining how you can upload files to SharePoint using PNP module. In this article, I want to show you how you can achieve upload files to SharePoint using Graph API. Note: This method works for …
- Create SharePoint list items using Graph API (PowerShell)SharePoint List items do represent a row of structured data in our SharePoint. Besides creating them manually, you have the opportunity to create them programmatically. In this article I want to show you how you can create SharePoint list items using Graph API with PowerShell.
- How to get SharePoint List Items with Graph API (PowerShell)In this article I am explaining how you can get SharePoint List items with Graph API. I took PowerShell to get the items, but you could also get all the items with a web request in the tool of your choice e.g. Postman.
- Security of app registration in Azure Active DirectoryOriginally, I thought about writing an article about how to get SharePoint list items with Microsoft Graph API by PowerShell. But before doing this, I thought you should first need to know something about app registration in Azure Active Directory in this context. App registrations are really powerful, as you can raise any request if granted. In this article, I …
- SharePoint Online: How to get all lists and librariesLearn how to get all lists and libraries with two PowerShell scripts to understand what is going on in your SharePoint tenant.
- Upload documents to SharePoint with PowerShell solutionLearn how to upload documents to SharePoint with PowerShell. Integrating different systems to SharePoint can be achieved easily with this.
- SharePoint Site Usage: Get active Sites for last 6 months with PowerShellWhen migrating our SharePoint to SharePoint Online, it can be really hard to separate the wheat from the chaff. SharePoint Site usage helps you find, what is actually used in your current farm. SharePoint farms grow by new projects and with the change of structures. If you want to have an overview, it is every time a good idea, to get rid of old stuff.
- SharePoint get all sites and subsites PowerShell scriptSharePoint sites are created very fast. With a few clicks, admins and users can create dozens of sites and subsites. Since it is so easy to create sites, we as admins should have an overview, what is going on at our SharePoint environment. I wrote scripts for this purpose to get all sites and subsites of your SharePoint, so you can trim your SharePoint to your business needs. You will find a script for SharePoint Server and SharePoint Online.
- SharePoint PowerShell add site collection administratorWhen you administer the SharePoint, you might need access to all sites. I have provided a collection of PowerShell scripts, so you can access all sites after running a script