Forum Discussion
Richard Bourke
Dec 05, 2016Iron Contributor
"Modern" News link appearing across all our team sites
A new link has appeared on the Quick Launch across all our "classic" team sites called News. This brings the user to a modern look page where they can create new "modern" pages. Does anyone k...
Dec 07, 2016
You can use the below PowerShell PnP script to remove "News" navigation from all Site Collections and sub-sites.
$o365=Get-Credential
Connect-PnPOnline -Url https://<tenantname>-admin.sharepoint.com -Credentials $o365
function fixupNavigation ($web,$url)
{
Remove-PnPNavigationNode -Title News -Location QuickLaunch -Force
Write-Host $Url ": News Removed"
$subwebs=$web.Webs
$context.Load($subwebs)
$context.ExecuteQuery()
foreach ($subweb in $subwebs)
{
Connect-PnPOnline -Url $subweb.Url -Credentials $o365
$context=get-pnpcontext
$subconweb=$context.Web
fixupNavigation $subconweb $subweb.Url
}
}
$Allsites=Get-PnPTenantSite
foreach ($Allsite in $Allsites)
{
Connect-pnpOnline -Url $Allsite.Url -Credentials $o365
$context=get-pnpcontext
$web=$context.Web
fixupNavigation $web $Allsite.Url
} Peter Stilgoe
Dec 07, 2016Iron Contributor
No showing on our prod tenant sites which is NOT 1st release