PnP PowerShell and more...

Here I occasionally post about Microsoft 365 Patterns and Practices in general and PnP PowerShell more specifically.

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

2018-03-26 3 min read
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. Continue reading

PnP PowerShell vs SharePoint Online Management Shell

2018-03-23 2 min read PowerShell
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? Continue reading

Using PowerShell in Visual Studio Code on MacOS

2018-03-22 2 min read
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. Continue reading

Automatic Context Switching in PnP PowerShell

2018-03-21 2 min read PowerShell SharePoint
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. Continue reading

Connect-PnPOnline demystified

2018-03-21 2 min read
So here goes: the long list of all ways to authenticate with PnP PowerShell, including some tips ##Credentials This is the most common way and I assume that many of you start off using this method. Connect-PnPOnline -Url https://contoso.sharepoint.com If you have not done any set up in the Windows Credential Manager, then executing the cmdlet like will popup a prompt for a username and password. It’s the easiest way to authenticate Continue reading

Getting started with the PnP Provisioning Engine and PnP PowerShell

2018-03-19 6 min read PowerShell SharePoint
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. Continue reading

The hidden gem in PnP PowerShell

2018-03-17 1 min read
There is something ‘hidden in plain sight’ in PnP PowerShell for SharePoint Online, and it’s been there already for a few years. Let me show you the command: Connect-PnPOnline -Url https://contoso.sharepoint.com -CreateDrive Notice that last parameter? -CreateDrive. It does exactly what it says it does. It creates a drive that you can navigate into. And you are effectively navigating into your site. How cool is that? By default it creates a drive called SPO: Continue reading
Older posts Newer posts