How to export an ADFS custom webtheme and import it to another server
As it is recommended on the following TechNet article:
"It is strongly recommended to validate your customizations in an alternate environment and test them prior to rolling it out onto production AD FS servers. This reduces the chances of end users being exposed to these customizations prior to validation."
Unless you have saved all the PowerShell cmdLet you typed to create your custom theme in your pre-production environment, it is quite challenging to recreate the exact same webtheme on your production servers. It is easy to export a configuration with the Export-WebTheme cmdLet. But it does not give you the ability to re-import what you just exported. I wrote the following script to help with that:
In a nutshell, we create our custom theme in our lab for example. In my case my webtheme is called Yoga. You export it to a folder:
Now you have a folder called C:\WebThemeExport that contains all your customization. Here is the content:
Then you copy this folder to your production server and you import the content:
All custom logos, illustrations, CSS and JavaScript will be imported in an existing theme or in a new theme, your call.
Comments
- Anonymous
September 04, 2015
awesome
thanks - Anonymous
September 13, 2015
I am just looking to export the ADFSWebtheme and came across this article. I see the script is quite explanatory and has many checks inbuilt. I would like to know if this is same as using command for exporting them - Export-AdfsWebTheme -Name "Theme01" -DirectoryPath "C:WebTheme" or there is some additional information that we get by using the script? - Anonymous
September 13, 2015
Good question. The challenge isn't really to export the webtheme. It is to re-import it. There is no built-in way to import a webtheme into a new webtheme or an existing one. Besides, having the files isn't enough. If you have added some AdditionalFileResources into your original webtheme you also need to export this mapping. And this is what is stored in the config.xml. I will edit the post to recall these challenges hoping it will make more sense for readers. Thanks Amit. - Anonymous
January 31, 2017
The comment has been removed