{"id":48661,"date":"2023-11-16T06:55:54","date_gmt":"2023-11-16T11:55:54","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=48661"},"modified":"2023-11-14T14:26:15","modified_gmt":"2023-11-14T19:26:15","slug":"how-to-convert-classic-sharepoint-pages-to-modern-pages-using-powershell","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/how-to-convert-classic-sharepoint-pages-to-modern-pages-using-powershell\/","title":{"rendered":"How to Convert Classic SharePoint Pages to Modern Pages Using PowerShell"},"content":{"rendered":"

We walk you through a high-level, step-by-step process to convert your classic SharePoint pages into modern pages.<\/h2>\n
\n

In today’s rapidly evolving digital landscape, maintaining an up-to-date and user-friendly SharePoint environment is crucial for optimal collaboration and productivity. The SharePoint user interface and features have evolved as it has become an underlying technology for much of the Microsoft 365 cloud, such as Microsoft Teams, OneDrive and Stream.<\/p>\n

One of the most significant improvements for SharePoint Online<\/a> compared to older on-premises SharePoint farms is the introduction of modern SharePoint pages. Modern pages offer a more streamlined and responsive experience, along with a host of new features and capabilities.<\/p>\n

If your organization is still using classic SharePoint pages and you’re looking to take advantage of the benefits of modern pages, this blog will guide you through a high-level process of converting classic SharePoint pages to modern pages using PowerShell.<\/strong><\/p>\n

Modern pages are a prerequisite for organizations wanting to take advantage of the modern employee experience using various modules from Microsoft Viva Suite<\/a>. Following the steps noted in this blog will get you closer to providing this modern employee experience to everyone across your organization, thus increasing their productivity, engagement and purpose.<\/p>\n

Benefits of Modern SharePoint Pages<\/h2>\n

Before we dive into the conversion process, let’s quickly recap some of the benefits of modern SharePoint pages<\/a>:<\/p>\n

    \n
  1. Responsive Design<\/strong>: Modern pages are designed to adapt to various screen sizes and devices, ensuring a consistent user experience across desktops, tablets, and mobile devices.<\/li>\n
  2. Improved Editing<\/strong>: The modern page editing experience is more intuitive and user-friendly, allowing users to easily add, edit and rearrange content using web parts.<\/li>\n
  3. Enhanced Web Parts<\/strong>: Modern pages offer a variety of modern web parts that allow you to embed content, display dynamic data, and interact with external services.<\/li>\n
  4. Elevated Performance<\/strong>: Modern pages are optimized for performance, resulting in faster load times and smoother user interactions.<\/li>\n
  5. Easy Integration<\/strong>: Modern pages seamlessly integrate with other Microsoft 365 services and apps, enhancing collaboration and productivity.<\/li>\n<\/ol>\n

    Convert Classic SharePoint Pages to Modern Using PowerShell<\/h2>\n

    Converting classic SharePoint pages to modern pages involves several steps, and PowerShell<\/a> can be a powerful tool to help automate this process. Please note that while PowerShell can assist in the conversion, there are certain restrictions and unsupported features to keep in mind.<\/strong><\/p>\n

    Prerequisites for Conversion<\/h3>\n

    Before starting the conversion process, you must have the following prerequisites in place:<\/p>\n

      \n
    1. SharePoint Online Management Shell<\/strong>: Install the SharePoint Online Management Shell and PNP PowerShell Module, which provides the necessary PowerShell cmdlets for managing SharePoint Online.<\/li>\n
    2. Administrator Access<\/strong>: You need administrative access to the SharePoint Online site where the classic pages are located.<\/li>\n<\/ol>\n

      Conversion Steps<\/h3>\n
        \n
      1. Generate Modernization Reports<\/strong>: Before making any changes, it’s wise to generate modernization reports using the modernization scanner. This tool identifies potential issues and provides recommendations for modernization. Review these reports to understand the scope of work required.<\/li>\n
      2. Identify All SharePoint Pages and Type of Page<\/strong>: Use PowerShell to identify all SharePoint pages in the site you will convert. By default, pages are created in the site pages or pages document libraries, but these may be created in other document libraries as well. There are four different types of classic pages: blog, wiki, webpart, and publishing pages, and each requires a different modernization script.<\/li>\n
      3. Generate Publishing Page Layout Mapping Files<\/strong>: Unlike webpart, wiki, and blog classic pages, publishing pages are always based on page layouts and master pages. Modernizing the publishing pages requires mapping files. You can use the PowerShell command Export-PnPPageMapping<\/code> to generate the mapping files.<\/li>\n
      4. Run Modernization Scripts<\/strong>: Microsoft offers a range of modernization scripts that target specific aspects of classic pages. The types of classic pages determine the modernization script needed. Based on the analysis done in step two, use the appropriate scripts.<\/li>\n
      5. Address Script Errors<\/strong>: During the script execution, you may encounter errors or warnings. These could be related to custom code, unsupported features, or other factors. Most errors result in the page not being modernized at all. Take note of these issues, correct them, and rerun the appropriate modernization scripts. The modernization scripts are not a silver bullet to modernize 100 percent of all classic pages since many pages may be customized or complex. The more efficient approach could be to rebuild these pages from scratch.<\/li>\n
      6. Test and Review<\/strong>: After running the modernization scripts, thoroughly test the modernized pages to ensure they meet expectations, checking for visual discrepancies, broken links, and any functional issues that may have emerged.<\/li>\n<\/ol>\n

        Restrictions and Unsupported Features<\/h3>\n

        While PowerShell can simplify and speed up the conversion process, it’s important to be aware of certain restrictions and unsupported features:<\/p>\n

          \n
        1. Custom Script and Code<\/strong>: Custom scripts and code embedded (including full-trust solutions) in classic pages might not function correctly in modern pages due to security restrictions. Review and adjust any customizations accordingly.<\/li>\n
        2. Master Pages and Page Layouts<\/strong>: Modern pages don’t support custom master pages and page layouts used in Classic Pages. You’ll need to recreate the layout using modern web parts.<\/li>\n
        3. Certain Web Parts<\/strong>: Some classic web parts might not have direct equivalents in the modern experience. You may need to manually find and configure alternative web parts and adjust the content accordingly.<\/li>\n
        4. Complex Layouts<\/strong>: Complex layouts involving multiple zones and columns might require manual adjustments to fit the modern page structure.<\/li>\n
        5. Branding<\/strong>: Modern pages have a different look and feel compared to classic pages. You might need to update branding elements like logos, colors and fonts to match the modern page designs.<\/li>\n<\/ol>\n

          In Conclusion<\/h2>\n

          Converting classic SharePoint pages to modern pages using PowerShell can be a significant step toward embracing the enhanced capabilities and user experience of modern SharePoint.<\/strong> While PowerShell can assist in automating parts of the conversion process, it\u2019s important to be prepared for manual adjustments, especially when dealing with unsupported features and customizations.<\/p>\n

          Thorough testing and validation are crucial to ensure a seamless transition for content creators and end-users. By understanding the benefits, steps, and potential challenges of this conversion, you can make a smoother transition to modern SharePoint pages.<\/p>\n

          \n

          \n
          \n With Microsoft Teams and Sharepoint, governance and adoption are key.\n <\/div>\n
          \n \n\n Watch Our Webinar\n <\/a>\n <\/div>\n <\/div>\n","protected":false},"excerpt":{"rendered":"

          We walk you through a high-level, step-by-step process to convert your classic SharePoint pages into modern pages.<\/p>\n","protected":false},"author":469,"featured_media":48674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"categories":[1],"tags":[23681,20420],"coauthors":[23793],"acf":[],"publishpress_future_action":{"enabled":false,"date":"2024-07-22 09:31:43","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/48661"}],"collection":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/users\/469"}],"replies":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/comments?post=48661"}],"version-history":[{"count":0,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/48661\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media\/48674"}],"wp:attachment":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media?parent=48661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/categories?post=48661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/tags?post=48661"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/coauthors?post=48661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}