Forum Discussion
Nabajyoti Bhattacharjee
Mar 26, 2018Copper Contributor
$web.ApplyTheme passing default font and background image url
Hi
I am trying to apply a new theme to my site using powershell; i have used
$web.ApplyTheme("<path", "","",$true) $web.update()
I am getting: Exception calling "ApplyTheme" with "4" argument(s): "The 'backgroundImageUrl' argument is invalid."
Could you please let me know how do i pass on blank or the default one for font and background image.
thanks
- paulpaschaBronze Contributor
This thread on stack exchange might help:
https://sharepoint.stackexchange.com/questions/147067/web-applytheme-for-sharepoint-online
Maybe PnP-PowerShell's Set-PnPTheme is more convenient for you to use:
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnptheme?view=sharepoint-ps