Aug 13 2018 09:42 PM
I'm creating some reusable scripts for provisioning a hub with connected sites, but there are cmdlets for hub sites that appear to serve the same purpose with slight differences in application (e.g. Register-SPOHubSite and Register-PnPHubSite).
What would be the reasoning behind having both, will these merge going forward and should I use one set over another?
Aug 13 2018 11:57 PM - edited Aug 13 2018 11:59 PM
SolutionSharePoint Online can be accessed with two type of PowerShell commands, SharePoint Online Cmdlets and SharePoint PnP Cmdlets.
Cmdlets contains -SPO are from SharePoint Online Cmdlets; which comes from SharePoint Online Management Shell.
Cmdlets contains -PnP are from SharePoint PnPPowerShell Cmdlets; which is a open source and it contains modules to access both SharePoint Online and SharePoint On-Premises.
SPO vs PnP:
Each has its own advantages. If you want to run the scripts on SiteCollection and Current User context, go with PnP PowerShell. By using PnP PowerShell, you can also reuse the scripts for On-Premise environment. For now, On-Premise doesn't have hub related features.
But If have the scripts to target Tenant level and require Tenant level admin, go with SharePoint Online Commands.
Nov 26 2018 06:07 AM
Aug 13 2018 11:57 PM - edited Aug 13 2018 11:59 PM
SolutionSharePoint Online can be accessed with two type of PowerShell commands, SharePoint Online Cmdlets and SharePoint PnP Cmdlets.
Cmdlets contains -SPO are from SharePoint Online Cmdlets; which comes from SharePoint Online Management Shell.
Cmdlets contains -PnP are from SharePoint PnPPowerShell Cmdlets; which is a open source and it contains modules to access both SharePoint Online and SharePoint On-Premises.
SPO vs PnP:
Each has its own advantages. If you want to run the scripts on SiteCollection and Current User context, go with PnP PowerShell. By using PnP PowerShell, you can also reuse the scripts for On-Premise environment. For now, On-Premise doesn't have hub related features.
But If have the scripts to target Tenant level and require Tenant level admin, go with SharePoint Online Commands.