New-AdfsWebTheme
New-AdfsWebTheme is accessible with the help of adfs module. To install adfs on your system please refer to this adfs.
Synopsis
Creates an AD FS web theme.
Description
The New-AdfsWebTheme cmdlet creates an Active Directory Federation Services (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.
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
-Name <String>
Specifies a name. The cmdlet assigns the name that you specify to the new theme.
Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-OnLoadScriptPath <String>
Specify this parameter to make resources, such as images, available to cascading style sheets or JavaScript applications.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-RTLStyleSheetPath <String>
Specifies a file path to a right-to-left (RTL) style sheet.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? 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.
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
-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
New-AdfsWebTheme -Name <String> [-SourceName <String>] [-StyleSheet <Hashtable[]>] [-RTLStyleSheetPath <String>] [-Logo <Hashtable[]>] [-Illustration <Hashtable[]>] [-AdditionalFileResource <Hashtable[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
———————–Example 1———————–
Create a theme
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”}
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.
———————–Example 2———————–
Copy a theme
PS C:> New-AdfsWebTheme -Name “Theme02” -SourceName “Default”
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.
———————–Example 3———————–
Create and modify a theme
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”}
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.
You can check the Version, CommandType and Source of this cmdlet by giving below command.
Get-Command New-AdfsWebTheme
You can also read about
- Export-AdfsWebTheme
- Get-AdfsWebTheme
- Remove-AdfsWebTheme
- Set-AdfsWebTheme