Forum Discussion

Nabajyoti Bhattacharjee's avatar
Nabajyoti Bhattacharjee
Copper Contributor
Mar 26, 2018

$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

 

 

 

 

1 Reply

  • paulpascha's avatar
    paulpascha
    Bronze 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

Resources