I am using pnp library to retrieve the Webparts used in the Sharepoint page using this
Get-PnPWebPart -ServerRelativePageUrl "path-to-files/test.aspx"
But the order in which the webpart is included in the page is different in the result I am getting from the above.
How can I retrieve the webparts in the same order it is included in the page?
See: https://learn.microsoft.com/en-us/answers/questions/194481/sharepoint-online-get-list-of-webparts-using-power
Try
Get-PnPClientSidePage:Try this and let me know if it helps.