Set_PnPWebHeader not working

%3CLINGO-SUB%20id%3D%22lingo-sub-3504023%22%20slang%3D%22en-US%22%3ESet_PnPWebHeader%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3504023%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20change%20the%20background%20image%20of%20the%20header%20on%20my%20sharepoint%20site%20but%20i%20can't%20seem%20to%20make%20it%20work.%20Am%20I%20doing%20something%20wrong%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EConnect-PnPOnline%20-Url%20https%3A%2F%2FXXX.sharepoint.com%2Fsites%2Ftest21%0ASet-PnPWebHeader%20-HeaderBackgroundImageUrl%20%22https%3A%2F%2FXXX.sharepoint.com%2Fsites%2FDataroomAjup%2FSiteAssets%2F__extendedHeaderBackgroundImage__getsitelogo.jpg%22%20-HeaderLayout%20Extended%20-HeaderEmphasis%20Strong%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3504023%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3513935%22%20slang%3D%22en-US%22%3ERe%3A%20Set_PnPWebHeader%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3513935%22%20slang%3D%22en-US%22%3EHi%3CBR%20%2F%3EI%20tried%20the%20code%20and%20it%20work%20fine%20on%20my%20end.%3CBR%20%2F%3Ewhat%20error%20are%20you%20getting.%3CBR%20%2F%3Ethe%20only%20thing%20I%20notice%20that%20if%20the%20path%20is%20incorrect%20the%20cmdlet%20wont%20return%20any%20error%2C%20and%20it%20looks%20it%20was%20OK%2C%20but%20its%20not.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3514434%22%20slang%3D%22en-US%22%3ERe%3A%20Set_PnPWebHeader%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3514434%22%20slang%3D%22en-US%22%3E%3CP%3EThats%20the%20problem%2C%20i've%20put%20the%20correct%20path%20meaning%20a%20relative%20path%20but%20it%20still%20doesn't%20work.%20So%20i'm%20a%20bit%20confused.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F790105%22%20target%3D%22_blank%22%3E%40farismalaeb%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3514853%22%20slang%3D%22en-US%22%3ERe%3A%20Set_PnPWebHeader%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3514853%22%20slang%3D%22en-US%22%3Etry%20to%20reupload%20the%20picture%20and%20ensure%20that%20the%20connected%20account%20have%20the%20permission%20to%20browse%20and%20navigate%20to%20the%20picture%20URL%3C%2FLINGO-BODY%3E
New Contributor

Hi everyone !

 

I'm trying to change the background image of the header on my sharepoint site but i can't seem to make it work. Am I doing something wrong ?

 

 

Connect-PnPOnline -Url https://XXX.sharepoint.com/sites/test21
Set-PnPWebHeader -HeaderBackgroundImageUrl "https://XXX.sharepoint.com/sites/DataroomAjup/SiteAssets/__extendedHeaderBackgroundImage__getsitelogo.jpg" -HeaderLayout Extended -HeaderEmphasis Strong

 

Thanks !

 

4 Replies
Hi
I tried the code and it work fine on my end.
what error are you getting.
the only thing I notice that if the path is incorrect the cmdlet wont return any error, and it looks it was OK, but its not.

Thats the problem, i've put the correct path meaning a relative path but it still doesn't work. So i'm a bit confused. @farismalaeb 

try to reupload the picture and ensure that the connected account have the permission to browse and navigate to the picture URL
it still doesn't work. idk if its sharepoint 2019 that has a problem