SharePoint2013-Toolbox.psm1
function Set-SPSuiteBarText{ Param( [Parameter(Mandatory=$True,Position=1)] [string]$WebApp, [Parameter(Mandatory=$True,Position=2)] [string]$Text, [Parameter(Mandatory=$False,Position=3)] [string]$Link = $null ) $ver = $host | select version if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } $spWebapp = Get-SPWebApplication -Identity $WebApp if ($Link -ne $null) { $spWebapp.SuiteBarBrandingElementHtml = '<div class="ms-core-brandingText" style="font-size: 15px !important; padding-left: 10px;"><a href="'+$Link+'" class="ms-core-suiteLink-a"><span>'+$Text+'</span></a></div>' } else { $webspWebappApp.SuiteBarBrandingElementHtml = '<div class="ms-core-brandingText">'+$Text+'</div>' } $spWebapp.Update() } Export-ModuleMember -Function * |