To find URLs on content pages of an entire site collection #290
Replies: 1 comment 2 replies
-
As a modern page is basically a set of webparts, you'll have to code that yourself. Think of using cmdlets like Get-PnPPageComponent -Page $pagetitle | %{$_.PropertiesJson | Select-String https://linktoyouroldintranet} If that returns something you'll know there is a link on that page pointing to the old intranet. Obviously you'll have to loop through all the pages, so do something alike $pages = Get-PnPListItem -List SitePages | %{$_["Title"]} This will select all the page titles. Then using the standard PowerShell constructs you can do things like looping through that collection and retrieving the correct page, etc. etc. |
Beta Was this translation helpful? Give feedback.
-
Is there any Powershell Script to find specific URLs present anywhere on content pages of an entire site collection site pages?
After migrating the pages and contents to the modern site, in some cases, I still have some document and page links to our old intranet. Basically, these links are on pages. I need to check all the pages and identify if there's anything that points to the old intranet. Is there a way to somehow automatically identify these links on all my subsites using PnP Powershell?
Beta Was this translation helpful? Give feedback.
All reactions