New-AdfsWebTheme

New-AdfsWebTheme

Creates an AD FS web theme.

Sintaxis

Parameter Set: Default
New-AdfsWebTheme -Name <String> [-AdditionalFileResource <Hashtable[]> ] [-Illustration <Hashtable[]> ] [-Logo <Hashtable[]> ] [-RTLStyleSheetPath <String> ] [-SourceName <String> ] [-StyleSheet <Hashtable[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The New-AdfsWebTheme cmdlet creates an Servicios de federación de Active Directory (AD FS) web theme. You can create an empty AdfsWebTheme object, or you can create an AdfsWebTheme object that is based on an existing theme. If you start with an existing theme, the cmdlet copies its properties to the new object. You can also specify properties for the AD FS web theme.

Parámetros

-AdditionalFileResource<Hashtable[]>

Specifies an array of Hashtable objects that specify additional file resources by using two string keys: Uri and Path. For more information, type Get-Help about_Hash_Tables. Uri is the relative Uniform Resource Identifier (URI) string for a resource. The URI always begins with /adfs/portal/. Path is the file path of a resource. If you do not specify the path, the cmdlet removes the file resource that corresponds to the specified URI.

Specify this parameter to make resources, such as images, available to cascading style sheets or JavaScript applications.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Illustration<Hashtable[]>

Specifies an array of Hashtable objects that specify illustrations by using two string keys: Locale and Path. Locale is a CultureInfo object. Path is a file path. If you do not specify a locale, Locale refers to the invariant locale.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Logo<Hashtable[]>

Specifies an array of Hashtable objects that specify logos by using two string keys: Locale and Path. Locale is a CultureInfo object. Path is a file path. If you do not specify a locale, Locale refers to the invariant locale. If you do not specify a path, the cmdlet removes the file content that corresponds to the specified locale.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies a name. The cmdlet assigns the name that you specify to the new theme.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-RTLStyleSheetPath<String>

Specifies a file path to a right-to-left (RTL) style sheet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-SourceName<String>

Specifies the name of an existing theme. The cmdlet uses the theme that you specify as the basis for the new theme.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-StyleSheet<Hashtable[]>

Specifies an array of Hashtable objects that specify style sheets by using two string keys: Locale and Path. Locale is a CultureInfo object for a style sheet. Path is a file path of the style sheet. If you do not specify a locale, Locale refers to the invariant locale. If you do not specify a path, the cmdlet removes the file content that corresponds to the specified locale.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.IdentityServer.Management.Resources.AdfsWebTheme

    This cmdlet generates a web customization object, System.IdentityServer.Management.Resources.AdfsWebTheme. This object includes the following properties:

    Name: System.String
    IsBuiltinTheme: System.Boolean
    StyleSheet: IDictionary<string, byte[]>
    Logo: IDictionary<string, byte[]>
    Illustration: IDictionary<string, byte[]>
    RTLStyleSheet: byte[]
    AdditionalFileResources: IDictionary<string, byte[]>

Ejemplos

Example 1: Create a theme

This command creates a theme named Theme01 that offers a customized sign-in experience. The command uses standard Windows PowerShell® syntax to create hash tables. For more information, type Get-Help about_Hash_Tables. The command specifies an additional file resource, an illustration image, a logo, and a cascading style sheet. The command specifies no value for Locale for any of these parameters, and, therefore, the illustration, logo, and style sheet all use the invariant locale.

PS C:\> New-AdfsWebTheme -Name "Theme01" -AdditionalFileResource @{Uri="/adfs/portal/Background.png";Path="C:\Background.png"} -Illustration @{Locale="";Path="C:\Illustration.png"} -Logo @{Locale="";Path="C:\Logo.png"} -RTLStyleSheetPath "C:\StyleSheet.css" -StyleSheet @{Locale="";Path="C:\StyleSheet.css"}

Example 2: Copy a theme

This command creates a theme named Theme02 and copies the existing theme, named Default, into the new theme. You can modify the new theme by using the Export-AdfsWebTheme or Set-AdfsWebTheme cmdlet.

PS C:\> New-AdfsWebTheme -Name "Theme02" -SourceName "Default"

Example 3: Create and modify a theme

This command creates a theme named Theme03, based on an existing theme named Default. The command specifies an additional file resource, an illustration image, a logo, and a cascading style sheet. The cmdlet specifies a value of en-us for Locale for the illustration, logo, and style sheet.

PS C:\> New-AdfsWebTheme -Name "Theme03" -AdditionalFileResource @{Uri="/adfs/portal/Background.png";Path="C:\Background.png"} -Illustration @{Locale="en-us";Path="c:\Illustration.png"} -Logo @{Locale="en-us";Path="C:\Logo.png"} -RTLStyleSheetPath "C:\StyleSheet.css" -SourceName "Default" -StyleSheet @{Locale="en-us";Path="C:\StyleSheet.css"}

Temas relacionados

Export-AdfsWebTheme

Get-AdfsWebTheme

Remove-AdfsWebTheme

Set-AdfsWebTheme