I've checked using SharePoint designer and when I run code like the following
Set-PnPListItem -List 'SitePages' -Id 29 -Values @{'BannerImageUrl' = ';}
The code within the ASPX page is modified to
<mso:BannerImageUrl msdt:dt='string'></mso:BannerImageUrl>
But the page when viewed in the borwser doesn't show no bannerimage.
Same if I copy the <mso:BannerImageUrl value from another page and use set-PnPListItem to insert it into a page ID29 . The ASPX page changes but the page doesn't display the new banner image. e.g.
Set-PnPListItem -List 'SitePages' -Id 29 -Values @{'BannerImageUrl' = 'https://brighterdays.sharepoint.com/_layouts/15/getpreview.ashx?guidSite=7b7f24b2-a8f8-47b9-ba32-99d7d24ea2bf&guidWeb=a6b51390-845d-4345-95c7-15b16d9048f9&guidFile=0b5854ac-fc5e-41d4-a772-a9fa0eae2b80, https://brighterdays.sharepoint.com/_layouts/15/getpreview.ashx?guidSite=7b7f24b2-a8f8-47b9-ba32-99d7d24ea2bf&guidWeb=a6b51390-845d-4345-95c7-15b16d9048f9&guidFile=0b5854ac-fc5e-41d4-a772-a9fa0eae2b80';}
Hope this helps
I am trying to create set of site collection by reading from a csv file. When I execute the script it will create the first site and then the script will get stuck. I don't use the -NoWait switch in New-SPOSite.
Same issue with the script from powershell.office.com/../create-multiple-spo-sites-from-csv-file
Following is the script.
Import-Module Microsoft.Online.Sharepoint.PowerShell
$credential = Get-credential
Connect-SPOService -url https://xxxxxxx-admin.sharepoint.com -Credential $credential Dawn of man download.
$siteList = Import-Csv .NewSPOSites.csv
try
{
foreach($site in $siteList)
Write-Host 'Creating site : ' $site.Name -ForegroundColor Yellow
New-SPOSite -Owner $site.Owner -StorageQuota $site.StorageQuota -Url $site.Url -Template $site.Template -Title $site.Name
Write-Host 'Site ' $site.Name ' created successfully.' -ForegroundColor Green
Write-Host
}
}
catch
{
write-host 'Caught an exception:' -ForegroundColor Red
write-host 'Exception Type: $($_.Exception.GetType().FullName)' -ForegroundColor Red
Sharepoint Online Set Header Compact Powershell Free
write-host 'Exception Message: $($_.Exception.Message)' -ForegroundColor Red
}
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |