Thursday, May 7, 2009

Find and delete broken links in the Site Directory in SharePoint automatically

The site directory links scan searches specified views for broken links in the site directory. The broken links are listed in the Broken Sites view of the site directory. To select this view, open the appropriate site directory and then click the Broken Sites view.

On the top navigation bar, click Operations.
On the Operations page, in the Global Configuration section, click Site directory links scan.
On the Site Directory Links Scan page, in the Choose views to scan section, type the URLs of the site directory views that you want to scan for broken links in the Site directory view URLs box (for example, type http://[ServerName]/sitedirectory/lists/sites/allitems.aspx). Separate the URLs by using commas.

The site directory is updated the next time that the site directory timer job is run. By default, this timer job is scheduled to run daily.

In the Update Site Properties section, select the Update title and description of links in the site directory automatically check box if you want the site directory links scan to automatically update link titles and descriptions.

This overwrites previous title and description values in the site directory.

Click OK.
Use the command line to schedule the site directory links scan to run automatically
You can use the Stsadm command-line tool to schedule a job to run the site directory links scan.

You must be a member of the Administrators group on the local computer to use the Stsadm command-line tool.

To use the command line to schedule this job, perform the following steps:
On the drive where SharePoint Products and Technologies are installed, change the directory to %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.

At the command prompt, type stsadm -o setsitedirectoryscanschedule -schedule recurrence string

The recurrence string indicates the frequency or the date and time at which to run the job.

Examples include:
every 5 minutes between 0 and 59
hourly between 0 and 59
daily at 15:00:00
weekly between Fri 22:00:00 and Sun 06:00:00
monthly at 15 15:00:00" "yearly at Jan 1 15:00:00

To view the current schedule for this job, you can use the following operation:
stsadm -o getsitedirectoryscanschedule

No comments:

Post a Comment