Running the various versions of PnP PowerShell side-by-side

You might be aware of the fact that we currently release 3 versions of PnP PowerShell: SharePoint PnP PowerShell 2013 SharePoint PnP PowerShell 2016 SharePoint PnP PowerShell Online Now what if you want all these versions installed, because you maybe target different versions of SharePoint? Why 3 versions? Let me first explain why we have 3 versions. It has to do with the underlying libraries we are using. PnP PowerShell makes use of the PnP Core Library. And that library is in its turn using the SharePoint Client-Side Object Model Libraries (CSOM). And those libraries come specifically for each version...

PnP PowerShell vs SharePoint Online Management Shell

Well, it's not really a matter of one versus the other. When we started of with PnP PowerShell, we used the -SPO prefix in the cmdlets, the same as what the by Microsoft provided SharePoint Online Management Shell is using. And while that worked quite okay, we ran into an issue when we released the Get-SPOSite cmdlet. That one was available already in the SharePoint Online Management Shell. Result: conflict. Which one should PowerShell use? There were a few work arounds for that but in the end it was easier if we simply changed our prefix to -PnP. I've been...

Using PowerShell in Visual Studio Code on MacOS

If you day to day life revolves around MacOS and Visual Studio Code but the rest of your team is working on Windows, you might see that many of them are using PowerShell. You don't have to be the odd-person-out, and besides that, PowerShell is an amazing shell in general, providing a scripting environment that is very hard to beat by other shells. So, a few things to do: Install PowerShell Navigate to https://github.com/PowerShell/PowerShell/blob/master/docs/installation/macos.md and follow the instructions. It's pretty straightforward. Make sure that PowerShell works by launching a terminal...

Automatic Context Switching in PnP PowerShell

PnP PowerShell does something we call 'context switching'. Let me show you how this is making your life a tiny bit easier: Connect-PnPOnline https://contoso.sharepoint.com Get-PnPList Get-PnPTenantSite This will connect first to your root site collection in your tenant, return all the lists in the site, and then the next cmdlet will show you all the (classic) site collections in your tenant. Normally you would have to connect (if you're a developer, you have to create a new ClientContext) to your tenant admin site first in order to do this. However, already for quite some time we made...

Getting started with the PnP Provisioning Engine and PnP PowerShell

Two of the most popular cmdlets in the PnP PowerShell module are Get-PnPProvisioningTemplate and its sibling Apply-PnPProvisioningTemplate. Follow me in this post where I dive into using them and show how make the most of them in your provisioning flow. Creating a Template Okay, so while it's totally possible to start creating a template by hand from scratch, it's a daunting task for sure. The PnP Provisioning Engine supports so many artifacts and each artifact has so many properties, you'll end up browsing the schema documentation for hours to come. Lets do it easier: create a site collection, modern, classic,...