Aug 17 2017 09:36 AM
I am connect to the tenant with an admin account but I can't get the get-pnpsite cmdlet to return data. Can someone please tell me what I'm doing wrong?
PS C:\WINDOWS\system32> Get-PnPSite -Includes Features.Count
Get-PnPSite : The query expression 'Param_0.Features.Count' is not supported.
At line:1 char:1
+ Get-PnPSite -Includes Features.Count
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Get-PnPSite], InvalidQueryExpressionException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Site.GetSite
Aug 18 2017 01:27 AM
it does not reconize the parameter features.count...
what happens if you only use Get-PnPSite
Aug 18 2017 03:47 AM
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
Sep 13 2017 07:06 AM
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 08:12 AM
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.