We walk you through a high-level, step-by-step process to convert your classic SharePoint pages into modern pages.
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.
One of the most significant improvements for SharePoint Online 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.
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.
Modern pages are a prerequisite for organizations wanting to take advantage of the modern employee experience using various modules from Microsoft Viva Suite. 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.
Benefits of Modern SharePoint Pages
Before we dive into the conversion process, let’s quickly recap some of the benefits of modern SharePoint pages:
- Responsive Design: Modern pages are designed to adapt to various screen sizes and devices, ensuring a consistent user experience across desktops, tablets, and mobile devices.
- Improved Editing: The modern page editing experience is more intuitive and user-friendly, allowing users to easily add, edit and rearrange content using web parts.
- Enhanced Web Parts: Modern pages offer a variety of modern web parts that allow you to embed content, display dynamic data, and interact with external services.
- Elevated Performance: Modern pages are optimized for performance, resulting in faster load times and smoother user interactions.
- Easy Integration: Modern pages seamlessly integrate with other Microsoft 365 services and apps, enhancing collaboration and productivity.
Convert Classic SharePoint Pages to Modern Using PowerShell
Converting classic SharePoint pages to modern pages involves several steps, and PowerShell 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.
Prerequisites for Conversion
Before starting the conversion process, you must have the following prerequisites in place:
- SharePoint Online Management Shell: Install the SharePoint Online Management Shell and PNP PowerShell Module, which provides the necessary PowerShell cmdlets for managing SharePoint Online.
- Administrator Access: You need administrative access to the SharePoint Online site where the classic pages are located.
- Generate Modernization Reports: 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.
- Identify All SharePoint Pages and Type of Page: 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.
- Generate Publishing Page Layout Mapping Files: 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-PnPPageMappingto generate the mapping files.
- Run Modernization Scripts: 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.
- Address Script Errors: 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.
- Test and Review: 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.
Restrictions and Unsupported Features
While PowerShell can simplify and speed up the conversion process, it’s important to be aware of certain restrictions and unsupported features:
- Custom Script and Code: 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.
- Master Pages and Page Layouts: 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.
- Certain Web Parts: 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.
- Complex Layouts: Complex layouts involving multiple zones and columns might require manual adjustments to fit the modern page structure.
- Branding: 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.
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. While PowerShell can assist in automating parts of the conversion process, it’s important to be prepared for manual adjustments, especially when dealing with unsupported features and customizations.
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.