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 in conflicts several times when building cmdlets. Should I build a cmdlet that does X, if a similar cmdlet is available in the SharePoint Online Management Shell? Most of the times I decided not to build it, because well, lets not duplicate functionality.
But when I started to work on the cross-platform version of PnP PowerShell we had a challenge: The SharePoint Online Management Shell is not available for other platforms than Windows. So I decided to port the ones that apply to basic day-to-day tasks. For specific ‘single tenant configuration’ tasks (e.g. things you most likely do only very seldom) you will still have to fall back to the official SPO Management Shell, but for those things that apply more to ‘devops’ work (hubsites, site designs, etc.) we now have coverage in the PnP PowerShell module.
PnP PowerShell does something I call ‘context switching’. Basically it means that the moment you use a cmdlet that requires a context pointing to your tenant admin site, it will automatically switch to that site. See more here
A list of the cmdlets that we recently introduced:
Register-PnPHubSite
Get-PnPHubSite
Unregister-PnPHubSite
Add-PnPHubSiteAssociation
Remove-PnPHubSiteAssociation
Get-PnPTenant
Set-PnPTenant
Add-PnPSiteCollectionAppCatalog
Remove-PnPSiteCollectionAppCatalog
Add-PnPTenantCdnOrigin
Remove-PnPTenantCdnOrigin
Set-PnPTenantCdnEnabled
Get-PnPTenantCdnEnabled
Set-PnPTenantCdnPolicy
Get-PnPTenantCdnPolicies
Add-PnPSiteDesign
Get-PnPDesignDesign
Remove-PnPSiteDesign
Set-PnPSiteDesign
Add-PnPSiteScript
Get-PnPSiteScript
Remove-PnPSiteScript
Set-PnPSiteScript
Grant-PnPSiteDesignRights
Revoke-PnPSiteDesignRights
Get-PnPSiteDesignRights
Invoke-PnPSiteDesign
Add-PnPTenantTheme
Remove-PnPTenantTheme
Set-PnPWebTheme