Editar

Compartilhar via


Set-AdfsRelyingPartyWebTheme

Applies a web theme to a relying party.

Syntax

Set-AdfsRelyingPartyWebTheme
   [-StyleSheet <Hashtable[]>]
   [-RTLStyleSheetPath <String>]
   [-OnLoadScriptPath <String>]
   [-Logo <Hashtable[]>]
   [-Illustration <Hashtable[]>]
   [-SourceWebThemeName <String>]
   [-SourceRelyingPartyName <String>]
   [-TargetRelyingPartyName] <String>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AdfsRelyingPartyWebTheme
   [-StyleSheet <Hashtable[]>]
   [-RTLStyleSheetPath <String>]
   [-OnLoadScriptPath <String>]
   [-Logo <Hashtable[]>]
   [-Illustration <Hashtable[]>]
   [-SourceWebThemeName <String>]
   [-SourceRelyingPartyName <String>]
   [-TargetRelyingPartyWebTheme] <AdfsRelyingPartyWebTheme>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AdfsRelyingPartyWebTheme cmdlet applies a web theme to a relying party. A web theme includes logo, illustration, stylesheets, and custom onload.js files.

Examples

Example 1: Create a custom theme and assign it to the Office 365 relying party trust

PS C:\> New-AdfsWebTheme -Name "Office365Theme" -SourceName "default"
PS C:\> Set-AdfsWebTheme -TargetName "Office365Theme" -Illustration @{Path="C:\localpath\illustration22.jpg"}
PS C:\> Set-AdfsRelyingPartyWebTheme -TargetRelyingPartyName "Microsoft Office 365 Identity Platform" -SourceWebThemeName "Office365Theme"

The first command creates an AD FS web theme by using the New-AdfsWebTheme cmdlet. The theme is named Office365Theme.

The second command modifies Office365Theme by using the Set-AdfsWebTheme cmdlet.

The final command assigns the custom theme to the Office 365 relying party trust.

Example 2: Create an advanced per application custom theme and assign it to a relying party

PS C:\> New-AdfsWebTheme -Name "AppSpecificTheme" -SourceName "default"
PS C:\> Export-AdfsWebTheme -Name "AppSpecificTheme" -DirectoryPath "C:\AppSpecificTheme"
PS C:\> Set-AdfsWebTheme -TargetName "AppSpecificTheme" -AdditionalFileResource @{Uri='/adfs/portal/script/onload.js';Path="C:\AppSpecificTheme\script\onload.js"}
PS C:\> Set-AdfsRelyingPartyWebTheme -TargetRelyingPartyName "urn:app1" -SourceWebThemeName "AppSpecificTheme"

The first command creates a theme as a copy of the default global theme in AD FS by using New-AdfsWebTheme.

The second command exports the theme for customization by using the Export-AdfsWebTheme cmdlet.

The third command customizes the theme by specifying files by using Set-AdfsWebTheme.

The final command applies the customized theme to a relying party.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Illustration

Specifies an illustration as a hash table.

Type:Hashtable[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Specifies a logo as a hash table.

Type:Hashtable[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnLoadScriptPath

Specifies the path of an onload script.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RTLStyleSheetPath

Specifies the path of the RTL style sheet.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SourceRelyingPartyName

Specifies the name of the source relying party.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SourceWebThemeName

Specifies the name of the source web theme.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StyleSheet

Specifies a style sheet as a hash table.

Type:Hashtable[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetRelyingPartyName

Specifies the name of the target relying party.

Type:String
Aliases:Name
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TargetRelyingPartyWebTheme

Specifies the name of the target web theme.

Type:AdfsRelyingPartyWebTheme
Aliases:TargetWebTheme
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False