Get-EffectiveSPPermissions error message on WSS 3.0 farm

Jul 5, 2012 at 9:52 AM
Edited Jul 5, 2012 at 9:53 AM

Hi to all,

We have been advised to use the Get-EffectiveSPPermissions script by a Microsoft Engineer on our WSS 3.0 and MOSS 2007 farm, to try and identify orphaned users and security prinicples on list items within a site collection. The lists were originally in excess of 15000, with security principles even greater and it is thought that this could be contributing to a reduction in system performance on a specific logic-based web application.

Having installed Powershell 2.0 on several of the farm servers (both Web Front End and Application servers running Windows 2008 and with the RemoteOnly Execution Policy enabled) I am unable to run the script as it returns the error message "WARNING: This computer does not seem to have Windows SharePoint Services installed! Please run this script on a server that is a member of a configured SharePoint farm. This script will now exit".

The confusing part is that all the servers are part of the specific SharePoint farm. If I load the SharePoint Assemblies manually and then query properties of a web application or other basic queries, I do get a response...I just cannot get this particular script to run.

If anyone has any suggestions or can see that I am blatantly doing something wrong, I would appreciate any help or advice anyone can give.

Sincere thanks


Feb 13, 2013 at 7:58 AM
Hi Paul,

Just wondering whether you managed to resolve this one. The script works great on a 2010 farm but I get the same error as you on the 2007 farm.

Your response will be appreciated.

Feb 13, 2013 at 8:29 AM
I found the answer soon after I posted.

For WSS 3.0 and MOSS replace the following lines:

if (-not (Get-PSSnapin | Where-Object {$_.Name -eq "Microsoft.SharePoint.PowerShell"}))
    Add-PSSnapin Microsoft.SharePoint.PowerShell;