Aug.06

How to change ‘ms-core-brandingText’ using PowerShell in SharePoint 2013

PowerShell scripting?  Isn’t that just a server thing for high level admins? It is true, but many things could be done with simple PowerShell scripts just in a few minutes and without previous knowledge.

  1. Create the following script in a plain text editor such as Notepad and save with a .PS1 extension (replace $Text content with your own)
     $WebAppUrl='http://sp2013-01:2525' $Text = '<div><a style="color:#FFFFFF" href="http://sp2013-01:2525">IntraNELT</a></div>' Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $webApp = Get-SPWebApplication $WebAppUrl $html = "<div class='ms-core-brandingText'>"+$Text+"</div>" $webApp.SuiteBarBrandingElementHtml = $html $webApp.Update()
  2. Start SharePoint 2013 Management Shell as admin, and run the script by entering the full path to the script (c:\scripts\script.ps1), or if it’s in the current directory, prefix it with a period followed by a backslash (.\script.ps1). If the path to the script contains a space, enclose the full path in quotation marks and prefix the entire thing with an ampersand (for example: &”C:\scripts\script.ps1″).
  3. Let’s now go and check out our title on SharePoint page.
Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment