Forum Discussion

Dean_Gross's avatar
Dean_Gross
Silver Contributor
Aug 17, 2017

Problem with Get-PnPSite cmdlet

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

4 Replies

  • Anonymous's avatar
    Anonymous

    it does not reconize the parameter features.count...

    what happens if you only use Get-PnPSite

    • Dean_Gross's avatar
      Dean_Gross
      Silver Contributor

      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         

      • John Heck's avatar
        John Heck
        Copper Contributor

        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.