Skip to content

SPWebAppSuiteBar

dscbot edited this page Mar 17, 2023 · 11 revisions

SPWebAppSuiteBar

Parameters

Parameter Attribute DataType Description Allowed Values
WebAppUrl Key String The URL of the web application
SuiteNavBrandingLogoNavigationUrl Write String SP2016+: Url to take the users to when the suite bar logo is clicked. This only works on classic pages for SP2019 and newer.
SuiteNavBrandingLogoTitle Write String SP2016+: Alternative text for the Suite Bar Logo. This only works on classic pages for SP2019 and newer.
SuiteNavBrandingLogoUrl Write String SP2016+: URL of the logo for the Suite Bar. This only works on classic pages for SP2019 and newer.
SuiteNavBrandingText Write String SP2016+: Text to display at the left hand side of the suite bar. No built in support of showing this on web pages in SP2019 and newer.
SuiteBarBrandingElementHtml Write String SP2013+: HTML to inject in the left hand-side of the Suite Bar. Only works in classic pages with a SharePoint 2013 master page in SharePoint 2016 and newer.

Description

Type: Distributed Requires CredSSP: No

This resource is used to set the Suite Bar branding for web applications. It supports both the SharePoint 2013 and SharePoint 2016/2019 ways of branding the suite bar.

Requirements: For SharePoint 2013, only the SuiteBarBrandingElementHtml should be specified, whereas for SharePoint 2016/2019, all properties are supported. Note that SuiteBarBrandingElementHtml has no effect unless using a SharePoint 2013 master page.

Examples

Example 1

This example sets the branding for the suite bar of a given Web Application in SharePoint 2016/2019.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPWebAppSuiteBar SP2016Branding
        {
            WebAppUrl                         = "https://intranet.sharepoint.contoso.com"
            SuiteNavBrandingLogoNavigationUrl = "http://sites.sharepoint.com"
            SuiteNavBrandingLogoTitle         = "This is my logo"
            SuiteNavBrandingLogoUrl           = "http://sites.sharepoint.com/images/logo.gif"
            SuiteNavBrandingText              = "SharePointDSC WebApp"
            PsDscRunAsCredential              = $SetupAccount
        }
    }
}

Example 2

This example sets the branding for the suite bar of a given Web Application in SharePoint 2013.

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPWebAppSuiteBar SP2013Branding
        {
            WebAppUrl                   = "https://intranet.sharepoint.contoso.com"
            SuiteBarBrandingElementHtml = "<div>SharePointDSC WebApp</div>"
            PsDscRunAsCredential        = $SetupAccount
        }
    }
}
Clone this wiki locally