Dart InnovationsDocs
ADFS Themes
dartinnovations.com

Install a theme on ADFS 4.0 (Windows Server 2016)

Add your logo, background and text to an ADFS 4.0 logon theme, install it with PowerShell, and restore the default theme.

This page shows how to brand and install a logon theme on Active Directory Federation Services (ADFS) 4.0, which runs on Windows Server 2016.

Your theme download includes a PDF install guide with the same steps. Follow the PDF guide during installation and use this page as a quick reference.

Before you begin#

  • Download your theme package (a ZIP file) for ADFS 4.0. Themes are version specific, so a theme for another ADFS version won't work.
  • Sign in to the ADFS server with an account that can run PowerShell as administrator.

Add your branding#

Add your own images and text to the theme package before you install it.

  1. Unzip the theme package and copy it to your ADFS server. Any drive or folder works.
  2. In the package, open the images\custom folder. All the custom images are here.
  3. Replace logo.png with your logo. The logo can be up to 80 px high and must be 10 KB or smaller.
  4. Replace favicon.ico with your favicon. Use a 16 × 16 px icon.
  5. Replace background.jpg with your background. The best size is 1920 × 1020 px, but any size works. The file must be 200 KB or smaller.
  6. Open script\onload.js in a text editor and change these values:

    Variable Text it sets
    Title The page title shown in the browser tab
    LoginTitle The heading of the logon form
    Footertext The footer text at the bottom of the page

    onload.js open in a text editor with the Title, LoginTitle and Footertext values highlighted

  7. Save the file.

Image size limits

The installation fails with errors if logo.png is larger than 10 KB or background.jpg is larger than 200 KB. Optimise the images before you install.

Install the theme#

  1. In the theme package, right-click BCthemeCommands.ps1 and select Run as administrator.
  2. Wait a few seconds. A PowerShell window opens and closes by itself when the installation finishes.
  3. Open your ADFS logon page in a browser. You see the new theme.

Restore the default theme#

To switch back to the default ADFS theme, open PowerShell as administrator and run:

Set-AdfsWebConfig -ActiveThemeName "default"

Remove a custom theme#

To delete a custom theme from ADFS, open PowerShell as administrator and run the command below. Replace Bluecorp with the name of your theme.

Remove-AdfsWebTheme -TargetName "Bluecorp"

Troubleshooting#

  • The installation shows errors. Check the image sizes: logo.png must be 10 KB or smaller and background.jpg 200 KB or smaller.
  • You want to undo the installation. Restore the default theme.

Type at least two letters. Use ↑ ↓ and Enter to open a result.