Forum Discussion
Problem with Get-PnPSite cmdlet
It works and returns the site url and compatibility level
PS C:\WINDOWS\system32> Get-PnPSite
Url CompatibilityLevel
--- ------------------
https://ems195245.sharepoint.com/sites/contoso 15
I am having a similar problem when using Get-PnPSite -includes Url. When using the command Get-PnPSite -includes Url it returns the Url of the SharePoint site that I am connected to. When sent to a parameter $site = Get-PnPSite -includes Url the value in $site = Microsoft.SharePoint.Client.Site so it will not allow me to do something like foreach($Web in $site.AllWebs) returns an error $site has a null value. All I am trying to do is go through all document sites and list all of the documents in each site. Cannot get anything to work.
- Sep 13, 2017
Hi Dean_Gross,
Are you trying to get the number of features in a site?
Simply run:
$site = Get-PnPSite -Includes Features $site.Features.Count
This will return the number of features. Count will be included when Features are included.