Section 3: Enabling AD FS Custom Theme

1. New-AdfsWebTheme -Name "DENEME1" -SourceName "default" Creates a new copy of the default theme named "DENEME1". You can replace "DENEME1" with the theme name you wish to use.

2. New-Item -ItemType Directory -Path "C:\\DENEME1" Creates the directory where we will work. Please write the path you want to work in instead of "C:\DENEME1".

3. Export-AdfsWebTheme -Name "DENEME1" -DirectoryPath "C:\\DENEME1" Exports the files (CSS, images) of the created theme to this folder for editing.

4. —VARIABLE DEFINITIONS— These codes are variable definitions. Replace "DENEME1" with the name of the theme you want to enable/have enabled in AD FS. Enter the file path of the theme for "$KlasorYolu".

PowerShell

$TemaAdi = "DENEME1" $KlasorYolu = "C:\\DENEME1"

5. Set-AdfsWebTheme -TargetName "DENEME1" -OnLoadScriptPath "$KlasorYolu\\script\\onload.js" Uploads the edited JavaScript (onload) file to the system.

6. Set-AdfsWebTheme -TargetName "DENEME1" -StyleSheet @{Locale=""; path="$KlasorYolu\\css\\style.css"} Uploads the edited CSS (style) file to the system.

7. Set-AdfsGlobalWebContent –CompanyName " " Removes the Company Name text on the login page by replacing it with a space. In the created design, this text disrupts the custom theme layout or prevents it from functioning correctly.

8. —ICON AND IMAGE UPLOADS— The following codes are the file commands for the icons and images belonging to the custom theme.

PowerShell

9. Set-AdfsWebConfig -ActiveThemeName "DENEME1" Activates the created theme in the AD FS system; this command must be executed for every update to take effect.

Last updated