Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierFlux principal

Update SharePoint Page Banner Image using PnP PowerShell

Using pages in SharePoint is a great way to share information or any news/announcement in your organization to SharePoint site users. SharePoint site pages can be improved by utilizing banner images in the page title area. Adding banner images to the page title area not only makes the page more visually appealing but also helps to convey the page’s purpose to the user more quickly and effectively.

In this blog post, we will see how to change the SharePoint Page Banner Image using PnP PowerShell.

First of all upload a high quality image in one of the document libraries in your SharePoint site. SharePoint site page banner images in title area look best when they are landscape or 16:9 or greater in aspect ratio, and when they are at least 1 MB in size. Check this Microsoft official documentation for recommended specifications for banner images: Image sizing and scaling in SharePoint modern pages

Then you can use below PnP PowerShell script to update the banner image at the top of the SharePoint online modern page:


# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/wlive"	

# Connect to SharePoint online site  
Connect-PnPOnline -Url $siteUrl -Interactive

# Update SharePoint site page banner image
Set-PnPPage -Identity "Open-Door-Policy" -HeaderType Custom -ServerRelativeImageUrl "/sites/wlive/SiteAssets/work-remotely.jpeg"

Once you run above script successfully, you will find that banner image for your SharePoint site page is updated successfully:

Update SharePoint online modern page banner image in page title area using PnP PowerShell
Update SharePoint Page Banner Image using PnP PowerShell

Learn more

Update SharePoint Page Banner Image using PnP PowerShell

Using pages in SharePoint is a great way to share information or any news/announcement in your organization to SharePoint site users. SharePoint site pages can be improved by utilizing banner images in the page title area. Adding banner images to the page title area not only makes the page more visually appealing but also helps to convey the page’s purpose to the user more quickly and effectively.

In this blog post, we will see how to change the SharePoint Page Banner Image using PnP PowerShell.

First of all upload a high quality image in one of the document libraries in your SharePoint site. SharePoint site page banner images in title area look best when they are landscape or 16:9 or greater in aspect ratio, and when they are at least 1 MB in size. Check this Microsoft official documentation for recommended specifications for banner images: Image sizing and scaling in SharePoint modern pages

Then you can use below PnP PowerShell script to update the banner image at the top of the SharePoint online modern page:


# SharePoint online site URL
$siteUrl = "https://contoso.sharepoint.com/sites/wlive"	

# Connect to SharePoint online site  
Connect-PnPOnline -Url $siteUrl -Interactive

# Update SharePoint site page banner image
Set-PnPPage -Identity "Open-Door-Policy" -HeaderType Custom -ServerRelativeImageUrl "/sites/wlive/SiteAssets/work-remotely.jpeg"

Once you run above script successfully, you will find that banner image for your SharePoint site page is updated successfully:

Update SharePoint online modern page banner image in page title area using PnP PowerShell
Update SharePoint Page Banner Image using PnP PowerShell

Learn more

update-sharepoint-page-banner-image-using-pnp-powershell

ganeshsanapblogs

Update SharePoint online modern page banner image in page title area using PnP PowerShell

❌
❌