Nick Grattan's Blog

About Microsoft SharePoint, .NET, Natural Language Processing and Machine Learning

Archive for the ‘SharePoint Administration’ Category

Auditing Permission Changes

with 13 comments

Question: Can you audit permission changes in a site collection?

Answer: This is possible, but by default security changes are not audited. To enable auditing:

  1. Select Site Actions + Site Settings + Modify All Site Settings at the site collection root site.
  2. Click the Site collection audit settings link.
  3. Select the Editing users and permissions option:

Audit1

Once turned on, changes to permissions on sites, lists and items will be audited. To view the audit log:

  1. Click the Audit log reports link on the “Site Settings” page for the site collection.
  2. Click the Security Settings link:

Audit2

This will open the audit log in an Excel spreadsheet. The following example shows a summary showing a single security change resulting from a breaking of permission inheritance:

Audit3

More detailed information is available in the “Report Data” sheet in the Excel workbook.

Advertisements

Written by Nick Grattan

November 27, 2007 at 9:13 pm

SPS 3.0 and MOSS 2007 Single Server Installs

leave a comment »

A single server install of MOSS 2007 will install SQL Server 2005 Express Edition and therefore each content database will be limited to 4GB. Therefore, a site collection (if given its own content database) will be limited to 4GB of content.

A SPS 3.0 single server install does not install SQL Server 2005 Express Edition – instead it installs the Windows Integrated Database (WID), which is also known as SQL Server 2005 Embedded Edition. The instance name is “MICROSOFT##SSEE”, and there are several limitations such as external connections are not permitted.

However, most importantly, WID databases do not have the 4GB limitation, and so practically speaking, the content size for a site collection is unlimited.

The database files are installed into “\WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data” which is typically located on drive C. This can cause problems as many servers use another drive for storing data.

The easiest way of moving a content database from the default location to another location is to perform a backup of the web application using Central Administration and then restore to the new location.

Restore

Written by Nick Grattan

November 16, 2007 at 12:13 pm

Blocked file extensions in SharePoint

leave a comment »

SharePoint maintains a list of blocked file types based on the filename extension. The default list is documented here.

You can change this list using Central Administration. Each web application has its own list which will apply to all site collections in the web application.

To maintain the list run Central Administartion and navigate to Operations + Blocked File Types.

Written by Nick Grattan

November 16, 2007 at 10:54 am

Indexing PST files in SharePoint (MOSS) 2007

with 2 comments

SharePoint 2007 does not provide an IFilter for indexing PST files. These files contain email messages and PST files can be generated from Microsoft Exchange using EXMerge.exe or by exporting from Microsoft Outlook.

Here is one technique for indexing the contents of a PST. First, you need to extract messages from the PST into separate MSG files. A tool like Aid4Mail (www.fookes.com) will do this for you. You can then create a content type for indexing the folder in which the MSG files are located.

Written by Nick Grattan

November 3, 2007 at 2:01 pm

Finding IFilters for SharePoint Indexing

with 2 comments

Looking for an IFilter for a particular file type? Take a look at www.ifilter.org as a starting point. This site has links to IFilters for ZIP, RAR, CHM, RTF, StarOffice, OpenOffice and other files types.

* Thanks to Jackie at Kainos for pointing this out to me.

Written by Nick Grattan

October 17, 2007 at 11:07 am

Setting Regional Settings with PowerShell

with 8 comments

This  blog entry describes how to use Microsoft PowerShell with the SharePoint and MOSS 2007 object model. Here is an example script that allows the regional settings for a site to be changed and follows the C# example presented here.

$spsite=[Microsoft.SharePoint.SPSite](“http://localhost:9000“)
$rootWebSite=$spsite.RootWeb
$website=$spsite.OpenWeb($rootWebSite.ID)
$culture=[System.Globalization.CultureInfo]::CreateSpecificCulture(“en-GB”)
$website.Locale=$culture
$website.Update()
$website.Dispose()
$rootWebSite.Dispose()
$spsite.Dispose()

Save the file with a “ps1” extension, e.g. “locale.ps1”. The script can be executed in PowerShell by typing:

 ./Locale.ps1

Note that even if the script file is in the current folder you still need to use the “./” notation to qualify the filename.

Written by Nick Grattan

September 3, 2007 at 11:26 am

Preparing PowerShell for SharePoint and MOSS 2007

with 18 comments

Microsoft PowerShell allows you to write scripts that can use .NET classes, objects, properties and methods. It therefore provides an ideal way of creating script files by calling into the SharePoint and MOSS object model.

First, download Microsoft PowerShell from here and install. PowerShell can then be lanched from the “Start” menu.

The PowerShell execution policy determines if script files can be run – by default they are prohibited for security reasons. Enter the following command to find out about execution policy and signing script files:

get-help about_signing

You can either elect to only run signed scripts (in which case scripts must be signed with a certificate), or to run unsigned scripts from the local file system or to run any unsigned script. For most users, allowing unsigned scripts to run from the local file system is acceptable, so to allow this enter the following commands to set and then retrieve the execution policy (you need to be logged on as administrator):

set-executionpolicy RemoteSigned
get-executionpolicy

Before programming against the SharePoint and/or MOSS 2007 object model the appropriate assemblies must be loaded. The following commands do this:

[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)

You can place these commands the file called Microsoft.PowerShell_profile.ps1 in a folder called My Documents\WindowsPowerShell to run commands automatically when you run PowerShell (the folder and the file may not exist and may need to be created).

You can now test calling into the SharePoint object model. The following command gets a reference to a site collection at the given URL:

$spsite=[Microsoft.SharePoint.SPSite](“http://localhost/sites/intranet“)

You can review all the property values for the SPSite object by typing the name of the object variable:

$spsite

You can find an example of creating a script file for chaning a site’s regional settings here.

 

 

 

 

 

Written by Nick Grattan

September 3, 2007 at 11:19 am