Welcome to the eighth post in the SharePoint Online Administrator series! After securing, monitoring, and organizing your environment, it’s time to work smarter — through automation.
As a SharePoint Online admin, repetitive tasks like user permission updates, reporting, or approvals can eat up your time. With PowerShell and Power Automate, you can automate these tasks — boosting efficiency, consistency, and reliability.
In this post, we’ll look at real-world automation scenarios, scripts, and flow designs to help you build your own automation toolkit.
⚙ Why Automate?
Automation helps you:
- Save time on daily tasks
- Reduce the chance of mistakes
- Improve response time to issues
- Empower users through self-service workflows
- Create consistency across sites and libraries
🧰 PowerShell for SharePoint Online Admins
🔑 Pre-requisite: Install the SharePoint Online PowerShell Module
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
✅ Common Admin Scripts
1. Get All SharePoint Sites with Storage Info
Get-SPOSite | Select Url, Title, Owner, StorageUsageCurrent, LastContentModifiedDate
2. List External Sharing Enabled Sites
Get-SPOSite | Where-Object {$_.SharingCapability -ne “Disabled”} | Select Url, SharingCapability
3. Bulk Create SharePoint Sites (From CSV)
$sites = Import-Csv “C:\Sites.csv”
foreach ($site in $sites) {
New-SPOSite -Url $site.Url -Owner $site.Owner -StorageQuota 1024 -Title $site.Title -Template “STS#3”
}
4. Set Retention Label on Document Library
Set-PnPLabel -List “Documents” -Label “HR – Retain 7 Years”
🔄 Automating Tasks with Power Automate
Power Automate (formerly Flow) is a low-code platform for automating SharePoint workflows. It’s ideal for approvals, notifications, and content processes.
🤖 Common SharePoint Automation Flows
1. Automated Document Approval Workflow
Trigger: File created or modified
Steps:
- Start approval → Send to manager
- Wait for response
- If approved → Update metadata to “Approved”
- Notify uploader
2. Move Files to Archive After Inactivity
Trigger: File modified
Condition: “Modified date older than 6 months”
Action: Move file to archive document library
3. Notify Admin When External Sharing Is Enabled
Trigger: Site Created
Condition: Sharing = “External enabled”
Action: Send Teams/Email notification to Admin
4. Auto-Create Folder Structure for New Projects
Trigger: New item in “Projects” list
Action: Create folder structure in associated document library
- /Requirements
- /Design
- /Final Deliverables
💡 You can also call PowerShell scripts from Power Automate using Azure Automation Runbooks for hybrid scenarios.
💼 Demo Scenario: Automate Project Document Approval
Let’s say your team creates project proposals in SharePoint. You want to automate their approval and tagging.
Flow Outline:
- Trigger: New file added to “Project Proposals”
- Condition: File type = “Proposal”
- Action 1: Send approval to team lead
- Action 2: If approved, update “Status” column to “Approved”
- Action 3: Move file to “Approved Proposals” folder
- Notify: Uploader via email
Simple. Scalable. Efficient.
🔒 Security + Governance Reminder
- Review PowerShell permissions — only assign to trusted admins
- Monitor Power Automate usage via the Power Platform Admin Center
- Use naming conventions for flows and scripts
- Document each automation for future reference and audits
✅ Admin Automation Checklist
- ✔ Installed SharePoint Online PowerShell module
- ✔ Created automation scripts for common reports
- ✔ Built at least one SharePoint flow in Power Automate
- ✔ Used Azure Automation for hybrid PowerShell triggers (optional)
- ✔ Documented flows/scripts for team reference
What’s Next?
In Post 9, we’ll cover Troubleshooting Common SharePoint Online Issues — including permission errors, sync problems, broken links, and slow site performance.
Keep automating — your future self (and your team) will thank you! ⚡🧠