Hi All,
In a following post we will see about how to delete Quick Links
using Powershell script in SharePoint.
Code Snippet for
Deletion:
if(!(Get-PSSnapin Microsoft.SharePoint.PowerShell
-ea 0))
{
Add-PSSnapin Microsoft.SharePoint.PowerShell
}
$web=Get-SPWeb "http://xyz"
$count =$web.Navigation.QuickLaunch.Count
Write-host "Count
of Quick Launch Items: " $count
if($count
-ge 0)
{
for ($i
=$count
-1; $i -ge 0; $i--)
{
write-host
$subWeb.Navigation.QuickLaunch[$i].Title "heading deleting...... "
$web.Navigation.QuickLaunch[$i].Delete()
write-host
"heading deleted successfully !!!."
}
$web.Update()
$web.Delete()
}
Hope
it useful,
Thanks.
Related Post
Powershell
- delete/Add Top Navigation Links using Powershell
- Get CheckedOut Files from SharePoint 2013 and MOSS2007
- PowerShell::Get Content Database Size in SharePoint
- PowerShell :: Delete All List Items
- Powershell :: Apply Master Page to all sub sites under site collection
- Get Site Collections specific to a Content Database and Export to CSV
- Remove-SPSite 0x80070003 - Forcely delete Site Collection that cannot be deleted
- Check Whether PowerShell Process is 32-bit or 64-bit?
- How to send Email by using Powershell in SharePoint
- Create Site Column Using Power Shell and Server Object Model
- Admin SVC must be running in order to create deployment timer job
- WSP Deployments in SharePoint using Powershell
- Create Site Collection by using Power Shell
- Create Web Application by using Powershell
- Backup Site Collection/Sub site/List(Library) in Share Point
- Get Site Collection Details using STSADM
- WSP Backup from Central Administration in Share Point
- Deactivate/Delete Site Template through Power shell
Quicklaunch
0 comments:
Post a Comment