We can change the site logo using PowerShell in SharePoint 2013. Before running the PowerShell command make sure you saved your site logo in any of the document libraries like SiteAssets.
You may read:
- Configure Following settings in SharePoint 2013
- How to disable/enable alert for a list or library in SharePoint 2019/2016/2013
- Cancel not completed workflows using PowerShell in SharePoint 2013
Below is the PowerShell command to change the Site Logo:
Add-PSSnapin Microsoft.Sharepoint.Powershell
$web = Get-SPWeb http://SharePointSiteURL
$web.SiteLogoUrl = "/SiteAssets/MyCompanyLogo.png"
$web.SiteLogoDescription = "My Company Logo"
$web.Update()
$web.Dispose()
Server Side Code to Change Logo:
Below is the SharePoint server side code to change Logo.
using (var site = new SPSite("http://SharePointSiteURL"))
{
using (var web = site.OpenWeb())
{
web.SiteLogoUrl = "/SiteAssets/MyCompanyLogo.png";
web.SiteLogoDescription = "My Company Logo";
web.Update();
}
}
You may read:
- Configure Following settings in SharePoint 2013
- How to disable/enable alert for a list or library in SharePoint 2019/2016/2013
- Cancel not completed workflows using PowerShell in SharePoint 2013
Below is the PowerShell command to change the Site Logo:
Add-PSSnapin Microsoft.Sharepoint.Powershell
$web = Get-SPWeb http://SharePointSiteURL
$web.SiteLogoUrl = "/SiteAssets/MyCompanyLogo.png"
$web.SiteLogoDescription = "My Company Logo"
$web.Update()
$web.Dispose()
Server Side Code to Change Logo:
Below is the SharePoint server side code to change Logo.
using (var site = new SPSite("http://SharePointSiteURL"))
{
using (var web = site.OpenWeb())
{
web.SiteLogoUrl = "/SiteAssets/MyCompanyLogo.png";
web.SiteLogoDescription = "My Company Logo";
web.Update();
}
}