Set-AdfsWebTheme

Set-AdfsWebTheme is accessible with the help of adfs module. To install adfs on your system please refer to this adfs.

Synopsis

Modifies properties of a web theme.

Description

The Set-AdfsWebTheme cmdlet modifies properties of an AdfsWebTheme object. Specify a web theme by name or by using the Get-AdfsWebTheme cmdlet.

Parameters

-AdditionalFileResource
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.

    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  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.

    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  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.

    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  false

-OnLoadScriptPath <String>


    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  false

-PassThru <SwitchParameter>
    Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  false

-RTLStyleSheetPath <String>
    Specifies a file path to a run-time library (RTL) style sheet.

    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  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.

    Required?                    false
    Position?                    named
    Default value                none
    Accept pipeline input?       false
    Accept wildcard characters?  false

-TargetName <String>
    Specifies a name. The cmdlet modifies the theme that you specify by name.

    Required?                    true
    Position?                    1
    Default value                none
    Accept pipeline input?       True (ByValue)
    Accept wildcard characters?  false

-TargetWebTheme <AdfsWebTheme>
    Specifies an AdfsWebTheme object. The cmdlet modifies the theme that you specify. To obtain an AdfsWebTheme object, use the Get-AdfsWebTheme cmdlet.

    Required?                    true
    Position?                    1
    Default value                none
    Accept pipeline input?       True (ByValue)
    Accept wildcard characters?  false

-Confirm <SwitchParameter>
    Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

    Required?                    false
    Position?                    named
    Default value                false
    Accept pipeline input?       false
    Accept wildcard characters?  false

-WhatIf <SwitchParameter>
    Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.

    Required?                    false
    Position?                    named
    Default value                false
    Accept pipeline input?       false
    Accept wildcard characters?  false

Syntax

Set-AdfsWebTheme [-StyleSheet <Hashtable[]>] [-RTLStyleSheetPath <String>] [-OnLoadScriptPath <String>] [-Logo <Hashtable[]>] [-Illustration <Hashtable[]>] [-AdditionalFileResource <Hashtable[]>] [-PassThru] [-TargetName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Set-AdfsWebTheme [-StyleSheet <Hashtable[]>] [-RTLStyleSheetPath <String>] [-OnLoadScriptPath <String>] [-Logo <Hashtable[]>] [-Illustration <Hashtable[]>] [-AdditionalFileResource <Hashtable[]>] [-PassThru] [-TargetWebTheme] <AdfsWebTheme> [-WhatIf] [-Confirm] [<CommonParameters>]

————Example 1————
Modify a web named theme
PS C:> Set-AdfsWebTheme -TargetName “Theme01″ -Illustration @{Locale=””;Path=”c:\illustration.png”} -Logo @{Locale=””;Path=”c:\logo.png”} -RTLStyleSheetPath “C:\StyleSheet.css” -StyleSheet @{Locale=””;Path=”c:\stylesheet.css”}
This command modifies a web theme named Theme01. The command uses standard Windows PowerShell® syntax to create hash tables. For more information, type Get-Help about_Hash_Tables. The command specifies an illustration image, a logo image, an RTL style sheet, and a cascading style sheet for Theme01. 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.

————Example 2————
Specify an additional resource
PS C:> Set-AdfsWebTheme -TargetName “Theme02″ -AdditionalFileResource @{Uri=”/adfs/portal/Background.png”;Path=”Background.png”}
This command specifies an additional file resource for the web theme named Theme02. The command makes a resource, in this case, BackGround.png, available to cascading style sheets or JavaScript applications.

————Example 3————
Modify a web theme by using a variable
PS C:> $Theme = Get-AdfsWebTheme -Name “Theme03”
PS C:> Set-AdfsWebTheme -TargetWebTheme $Theme -Illustration @{Locale=””;Path=”C:\Illustration.png”} -Logo @{Locale=””;Path=”C:\Logo.png”} -RTLStyleSheetPath “C:\StyleSheet.css” -StyleSheet @{Locale=””;Path=”C:\StyleSheet.css”}
The first command uses the Get-AdfsWebTheme cmdlet to get the web theme named Theme03, and then stores it in the $Theme variable.
The second command modifies the web theme stored in the $Theme. The command specifies an illustration image, a logo image, an RTL style sheet, and a cascading style sheet for that theme.

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command Set-AdfsWebTheme

Get-Command Set-AdfsWebTheme powershell script command cmdlet adfs

You can also read about

  • Export-AdfsWebTheme
  • Get-AdfsWebTheme
  • New-AdfsWebTheme
  • Remove-AdfsWebTheme

To know more PowerShell cmdlets(Commands) on Active Directory Federation Services(ADFS) click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Leave a Reply

Your email address will not be published. Required fields are marked *