My task was to create a report detailing various properties of a SharePoint site collection. Identifying which properties corresponded to specific PowerShell syntax required additional time.
Ultimately, I developed this script to determine which properties are available in different syntaxes such as PnPTenantSite, PnPSite, and PnPWeb in PnP.Powershell module.
This script has proven to be very useful in understanding the properties. Please adjust the input as per your requirements; I have included all site collections in the tenant. The output is exported into CSV files.
Replace your Azure App ClientID and AdminSiteUrl. When using -Interactive in Connect-PnPOnline, you will see the credentials pop-up a couple of times. I used to keep the SP admin center site logged in on the default browser with same credentials to reduce the number of interactive sessions.
The Microsoft.SharePoint.Client module is part of the SharePoint Online Client Components SDK, which is used to enable development with SharePoint Online. This module allows developers to interact with SharePoint Online using client-side object model (CSOM) APIs. It provides a way to perform various operations on SharePoint Online sites, such as creating and managing lists, libraries, and site collections, as well as handling permissions and workflows[1].
The SharePoint Online Client Components SDK can be downloaded from the official Microsoft Download Center[1]. However, it is recommended to use NuGet packages rather than installing CSOM assemblies to the Global Assembly Cache (GAC)[1].
Additionally, the Microsoft.Online.SharePoint.PowerShell module is another tool that can be used to manage SharePoint Online. It allows administrators to perform tasks such as updating the SharePoint Online Management Shell and managing tenant-level settings[2].
The Microsoft.SharePoint.Client and Microsoft.Online.SharePoint.PowerShell modules serve different purposes and are used in different contexts when working with SharePoint Online.
The Microsoft.SharePoint.Client module is part of the SharePoint Online Client Components SDK. It allows developers to interact with SharePoint Online using client-side object model (CSOM) APIs. This module is primarily used for development purposes, enabling operations such as creating and managing lists, libraries, and site collections, as well as handling permissions and workflows[3].
On the other hand, the Microsoft.Online.SharePoint.PowerShell module is a set of cmdlets specifically designed for SharePoint Online administration. It allows administrators to perform various management tasks, such as updating the SharePoint Online Management Shell and managing tenant-level settings[4]. This module is used within PowerShell to automate administrative tasks and manage SharePoint Online environments more efficiently[5].
In summary, the Microsoft.SharePoint.Client module is geared towards developers for building and interacting with SharePoint Online applications, while the Microsoft.Online.SharePoint.PowerShell module is intended for administrators to manage and configure SharePoint Online environments.