I did it with the following code,
Add-PSSnapin Microsoft.Sharepoint.Powershell
$FindString = “something”
Get-SPSite http:/sitecollectionurl/ | get-spweb -limit all | foreach-object{
$web = $_
$_.Navigation.QuickLaunch | ForEach-Object {
$_.Children | ForEach-Object {
if($_.title -eq $FindString){
$node = $_
$node.delete()
Write-Host “Deleted node from ” $web “-” $web.url
}
}
}
}
Remove-PsSnapin Microsoft.SharePoint.PowerShell
OR
try the below codes too
To delete the link from the Quick Launch
Add-PSSnapin Microsoft.Sharepoint.Powershell
$webURL="http://serverName:1111/sites/SPSiteDataQuery/"
$web=Get-SPWeb $webURL
$navigationNodeColl=$web.Navigation.QuickLaunch
$heading = $navigationNodeColl | where { $_.Title -eq "Libraries" }
$link = $heading.Children | where { $_.Title -eq "Shared Documents" }
$link.Delete()
Remove-PsSnapin Microsoft.SharePoint.PowerShell
To delete the heading from the Quick Launch
Add-PSSnapin Microsoft.Sharepoint.Powershell
$webURL="http://serverName:1111/sites/SPSiteDataQuery/"
$web=Get-SPWeb $webURL
$navigationNodeColl=$web.Navigation.QuickLaunch
$heading = $navigationNodeColl | where { $_.Title -eq "Libraries" }
$heading.Delete()
Remove-PsSnapin Microsoft.SharePoint.PowerShell
Source