Automate Your Way to SharePoint Online Using Windows PowerShell

​​Once used by most as a replacement for the command-line, Windows PowerShell has evolved into a very useful automation tool; one that every IT organization should utilize. ​​If you are bound to the Microsoft ecosystem, you need to use PowerShell, or you will fall behind. 

Why? Well, let's break down the administrative capabilities of PowerShell within Office 365 and, more specifically, SharePoint Online.

PowerShell and SharePoint first came together in the SharePoint 2010 release. In addition to the deprecated STSADM.exe tool, 200+ cmdlets (pronounced command-lets) were provided. These cmdlets provided the framework for developers and administrators to write their own scripts, functions, cmdlets and modules. 

When SharePoint 2013 was released, roughly 720 cmdlets were included, further reinforcing PowerShell as the administrative tool for SharePoint. While SharePoint 2016 has over 800 cmdlets, SharePoint Online only lists about 42 cmdlets. 

​While it's certainly helpful that Office 365 provides cmdlets for SharePoint Online, the small number (due to the multitenant infrastructure) limits your capabilities from an administration perspective. Let's explore the nouns you have access to using the Microsoft.Online.SharePoint.PowerShell module:​

  1. SPOUser 
  2. SPOService 
  3. SPOMigrationTargetedPackage 
  4. SPOAppErrors 
  5. SPOAppInfo 
  6. SPODeletedSite 
  7. SPOExternalUser 
  8. SPOMigrationJobProgress 
  9. SPOMigrationJobStatus 
  10. SPOSite 
  11. SPOSiteGroup 
  12. SPOTenant 
  13. SPOTenantLogEntry 
  14. SPOTenantLogLastAvailableTimeInUtc 
  15. SPOTenantSyncClientRestriction 
  16. SPOWebTemplate 
  17. SPOMigrationPackage 
  18. SPOMigrationJob 
  19. SPOPersonalSite 
  20. SPOUpgradeEvaluationSite 
  21. SPOUserSession 
  22. SPOMigrationPackageAzureSource

While there are several areas you can administer from SharePoint Online via PowerShell, you don't get the granular level you do in on-premises versions. This is why Blue Chip developed a tool called BluePrint.

BluePrint is a framework for the development of custom PowerShell cmdlets for use with SharePoint Online and SharePoint 2013/2016 on-premises. 

To align with the shift to client-side code, Blue Chip developed PowerShell cmdlets for SharePoint using C# with client-side object model (CSOM) code. This allows BluePrint to work with both on-premises and online versions of SharePoint Server. 

To really understand the value that BluePrint adds, let's look at the nouns available in the BluePrint PowerShell module:

  1. BPSPO2010ListWorkflowAssociation 
  2. BPSPOContentTypeToList 
  3. BPSPOSandboxedSolution 
  4. BPSPOSiteColumnAssociation 
  5. BPSPOUser 
  6. BPSPOWebPartToGallery 
  7. BPSPOWebPartToPublishingPage 
  8. BPSPOFeature 
  9. BPSPOSearchConfiguration 
  10. BPSPOAvailableAndDefaultPageLayouts 
  11. BPSPOContentType 
  12. BPSPOContentTypeFromList 
  13. BPSPOGroup 
  14. BPSPOList 
  15. BPSPOListItem 
  16. BPSPOListView 
  17. BPSPOMasterPageUrl 
  18. BPSPOPermissionLevel 
  19. BPSPOResultSourceId 
  20. BPSPOSearchNavigationNode 
  21. BPSPOSiteCollection 
  22. BPSPOSiteColumn 
  23. BPSPOTerm 
  24. BPSPOTermGroup 
  25. BPSPOTermGroups 
  26. BPSPOTerms 
  27. BPSPOTermSet 
  28. BPSPOTermSets 
  29. BPSPOTermStore 
  30. BPSPOWeb 
  31. BPSPOWebPartFromGallery 
  32. BPSPOWebPartFromPublishingPage 
  33. BPSPOContentOrganizerRule 
  34. BPSPOContext 
  35. BPSPOMetadataSiteColumn 
  36. BPSPOPublishingPage 
  37. BPSPOReusedTerm 
  38. BPSPOGroupPermission 
  39. BPSPOListField 
  40. BPSPOPublishingPageLayouts 
  41. BPSPOSiteCustomScripting 
  42. BPSPOWebProperty 
  43. BPSPOWelcomePage

With BluePrint, there are 43 new nouns implemented and key areas with which automation is now possible. 

Imagine you are implementing SharePoint Online for a global company with many departments and divisions. You may have dozens of site collections, subsites, lists, libraries or standard managed metadata terms used across the tenant. Implementing all of those things manually is possible, but it would take a very long time. It would also open up opportunities for mistakes or misconfigurations. But, by using BluePrint, an entire architecture could be open​ed up front and implemented very quickly

Imagine a mature IT organization implemented multiple Office 365 tenants for development, testing and production purposes. Migrating the SharePoint Online configuration from one tenant to another is possible using other methods (e.g. a 3rd party migration tool) but, using BluePrint, the configuration can be documented once in XML format. Then, the same configuration can be used for other tenants while specifying a different tenant URL, administration account and other high-level, tenant-specific variables.

Simply put, Office 365 and SharePoint Online are now the de facto standard for collaboration within the Microsoft ecosystem. While there are tools available to you out-of-the-box, IT partners, like Blue Chip, can extend your tool belt. Using a tool like BluePrint, value can be added to solutions and consistent, repeatable processes for deployment automation can be defined.

Want to learn more about BluePrint? Drop us a line:​.