Get-PnPWebPart returns no results for modern SPO pages

Contributor

Using PnP Powershell, Get-PnPWebPart returns no results. 

 

$webParts = Get-PnPWebPart -ServerRelativePageUrl "/sites/SampleSite/SitePages/ABC.aspx"

$webParts.Count = 0

ABC.aspx is a page in the Site Pages library within a modern team site.

 

Get-PnPFile successfully returns the page.

 

Please assist.

1 Reply

Use PnPClientSidePage to retrieve controls