Friday, January 30, 2009

SUSHI Version 3.4 Released

 

SUSHI Version 3.4 includes the following improvements:

  • Important Improvement: Security Report: The logic for looking up Active Directory Groups that a User is a member of has been improved so that users with read-only privileges to Active Directory can successfully query group membership.
  • Delete old documents: This feature is now asynchronous and includes a cancel so that the action can be canceled after it has started but before it is finished. This is useful when archiving a large number of documents.
  • Bulk List Creation: Tips for bulk deleting lists and renaming list URLs added.

Check for Memory Leaks in your SharePoint API Code

 

Microsoft has just released a memory leak checker for SharePoint code. Not sure if all your SPWeb and SPSite objects have been properly disposed? Use this tool to discover which lines of your code are not properly disposing of those objects.

 

Each SPWeb and SPSite object takes 1-2 megs of unmanaged memory. So no properly disposing of them causes major memory leaks. However, (this is important) if you dispose of a SPSite object that you get from SPContext.Current, you will crash your SharePoint site. So having a tool that you can run to definitively determine if your production code is good, is a big help.

 

-Joseph

Saturday, January 24, 2009

SharePoint SUSHI Version 3.3 Released

I am pleased to announce the release of SUSHI, version 3.3.  About SharePoint SUSHI.

 

sushi_homepage4.png

 

New Features, Improvements and Bug Fixes

  • Delete old documents: Copy documents older than a specified date to an archive folder and then delete them from SharePoint.
  • Security Report: User can type and also select from the list. As the user types, the name of the SharePoint User is found.
  • Awesome new screenshot on the Codeplex SUSHI home page. :)

 

I would like to thank the community for all the great feedback. I am working to incorporate your ideas as quickly as possible. Knowing which features you are using is helpful to know which features to prioritize.

 

Thank you to all who have donated to SUSHI. This is always a very big help. You are welcome to make a small donation to SUSHI.

 

-Joseph Fluckiger

Scripted SharePoint Install

Doing a scripted install of MOSS can save a lot of time, and can also ensure that your installs are consistent.

Below is a sample scripted install of MOSS. (I have changed sensitive information like passwords, emails and URLS.)

I have found that it works best to execute these commands one at a time, rather than as a single script. If you are unlike me and never make mistakes, then feel free to run them all at once. Another added benefit is that this provides very nice documentation of your install for future posterity. And for someone who understands windows scripts can teach quite effectively what it takes to install MOSS, surely much more effectively than the beastly 30 page install instructions on MSDN.

One of my favorite benefits of a scripted install is that you can choose a name for the Central admin content database instead of getting stuck with the ugly content database name the includes a Guid. Some of the setproperty statements at the end are optional, but they give you an idea of how you can customize this script to make sure the same policies are applied across environments.

Credit for these scripts go to Ben Curry.

------------------------------

@echo off
REM //////////////////////////////////////////////////
REM // script farm -- creating dbs and setting sites /
REM //  sharepoint farm.                             /
REM //////////////////////////////////////////////////

REM //////////////////////////////////////////////////
REM // applications
REM //////////////////////////////////////////////////
set s="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
set ps="c:\program files\common files\microsoft shared\web server extensions\12\bin\psconfig.exe"

REM //////////////////////////////////////////////////
REM // your enterprise SQL server
REM //////////////////////////////////////////////////
set sql=TOPDEV

REM //////////////////////////////////////////////////
REM // account vars
REM //////////////////////////////////////////////////
set mossfarm=dev\mossfarm
set mosscrawler=dev\mosscrawler
set sspapid=dev\mosswebapp
set myapid=dev\mosswebapp
set sspservice=dev\mossfarm
set portalapid=dev\mosswebapp
set mossservice=dev\mossfarm

REM //////////////////////////////////////////////////
REM // password
REM //   NOTE:if using a % sign in password you must
REM //        escape it with a % sign 'iuyOP%%$#@!11'
REM //        is interpreted as 'iuyOP%$#@!11'
REM //       
REM //////////////////////////////////////////////////
set p=MyPasswordIsSomething

REM //////////////////////////////////////////////////
REM // additional settings
REM //////////////////////////////////////////////////
set sspportalurl=http://ssp.catapultdemo.com:81
set mysiteurl=http://my.catapultdemo.com:81
set portalurl=http://catapultdemo.com:81
set owneremail="joseph at email.com"
set ownername="Joseph Fluckiger"
set ownerlogin="dev\josephf"

REM //////////////////////////////////////////////////
REM // start work here
REM //////////////////////////////////////////////////

GOTO CURRENTSPOT
:CURRENTSPOT

Echo ===============================
Echo == Creating Farm
Echo ===============================
:: Creating Farm via populating the ConfigDB. Set SQL Servername, configDB name, Central Admin ContentDB, and Farm Account.
@pause
%ps% -cmd configdb -create -server %sql% -database SharePoint_Config_TOPDEV -user %mossfarm% -password %p% -admincontentdatabase SharePoint_Content_CentralAdmin
Echo ======================
Echo Provision Central Admin
Echo ======================
::  Provision Central Admin Application on this server. Uses configDB and ContentDB above. Set port number to suit your requirements.
@pause
%ps%  -cmd adminvs -provision -port 5000 -windowsauthprovider onlyusentlm
Echo ======================
Echo Install all Services
Echo ======================
::  Install all services on machine
@pause
%ps% -cmd services install
Echo ======================
Echo Securing File System and Registry Keys
Echo ======================
:: Set Security on File System and Registry Keys
@pause
%ps% -cmd secureresources
Echo ======================
Echo Starting MOSS Search
Echo ======================
::  Start SharePoint Server Search Service.Verify database and services names. Change role to Index, Query, or IndexQuery, depending on your farm topology.
@pause
%s% -o osearch -action start -role Indexquery -farmcontactemail %owneremail% -farmperformancelevel PartlyReduced -farmserviceaccount %mossservice% -farmservicepassword %p%
Echo ======================
Echo Starting WSS Search
Echo ======================
::  Start WSS Search. Verify database and service names.
@pause
%s% -o spsearch -action start -farmserviceaccount %mossservice% -farmservicepassword %p% -farmcontentaccessaccount %mosscrawler% -farmcontentaccesspassword %p% -databaseserver %sql% -databasename SharePoint_WSS_Search
Echo ======================
Echo Installing all Features
Echo ======================
::  Install all features on machine
@pause
%ps% -cmd installfeatures
Echo ======================
Echo Creating My Sites Web
Echo ======================
::  Create My Site Web application. Verify database name and administrator's names.
@pause
%s% -o extendvs -url %mysiteurl% -ownerlogin "%mossfarm%" -owneremail %owneremail% -exclusivelyusentlm -ownername "mossAdmin" -databaseserver %sql% -databasename SharePoint_Content_MySite -sitetemplate spsmsitehost -description "My Site Host" -sethostheader -apidname MySiteAppPool -apidtype configurableid -apidlogin %myapid% -apidpwd %p%
iisreset
Echo ======================
Echo Enabling Self Service Site Management for %mysiteurl%
Echo ======================
::  Enable Self Service Site Management (Creation) on %mysiteurl%
@pause
%s% -o enablessc -url %mysiteurl%
Echo ======================
Echo Creating SSP Web
Echo ======================
::  Create SSP Web application. Verify database and apid names. (APID = Application Pool Identity)
@pause
%s% -o extendvs -url %sspportalurl% -exclusivelyusentlm -databaseserver %sql% -databasename SharePoint_Content_SSP -donotcreatesite -description "SSP Admin Host" -sethostheader -apidname "SSP1" -apidtype configurableid -apidlogin %sspapid% -apidpwd %p%
::  We must reset IIS before building the SSP. If you are local on the box, you can check all services are created before creating SSP.
iisreset
Echo ======================
Echo Creating SSP
Echo ======================
::  Create SSP. Verify all names and URLs.
@pause
%s% -o createssp -title "SSP1" -url %sspportalurl% -mysiteurl %mysiteurl% -ssplogin %sspservice% -indexserver topdev -indexlocation "C:\Program Files\Microsoft Office Servers\12.0\Indexes" -ssppassword %p% -sspdatabaseserver %sql% -sspdatabasename SharePoint_SSP1_Config -searchdatabaseserver %sql% -searchdatabasename SharePoint_SSP1_Search -ssl no
Echo ======================
Echo Creating Portal
Echo ======================
::  Creating Portal.
@pause
%s% -o extendvs -url %portalurl% -ownerlogin %ownerlogin% -owneremail %owneremail% -ownername %ownername% -exclusivelyusentlm -databaseserver %sql% -databasename SharePoint_Content_catapultdemo -sitetemplate STS#1 -description "Catapult Demo Portal" -sethostheader -apidname "MossWebAppPool" -apidtype configurableid -apidlogin %portalapid% -apidpwd %p%
REM //////////////////////////////////////////////////
REM // POST BUILD
REM //////////////////////////////////////////////////
Echo ========================
Echo Modifying Logging level
Echo and Outbound Smtp
Echo ================calling setlogs.cmd====see premium content for xlsx source file=======
REM  or just set the logging levels in this script
@pause
%s% -o setlogginglevel -category general -tracelevel unexpected -windowslogginglevel error
%s% -o email -outsmtpserver topdev -fromaddress %owneremail% -replytoaddress %owneremail% -codepage 65001

Echo ========================
Echo Setting Application Settings
Echo Setting Recycle Bin Settings
Echo ========================
@pause
%s% -o setproperty -pn recycle-bin-enabled -pv yes -url %portalurl%
%s% -o setproperty -pn recycle-bin-enabled -pv yes -url %mysiteurl%
%s% -o setproperty -pn recycle-bin-retention-period -pv 180 -url %portalurl%
%s% -o setproperty -pn recycle-bin-retention-period -pv 180 -url %mysiteurl%
%s% -o setproperty -pn second-stage-recycle-bin-quota -pv 20 -url %portalurl%
%s% -o setproperty -pn second-stage-recycle-bin-quota -pv 20 -url %mysiteurl%

Echo ========================
Echo Setting Maximum Upload
Echo File Size
Echo ========================
@pause
%s% -o setproperty -pn max-file-post-size -pv 200 -url %portalurl%
%s% -o setproperty -pn max-file-post-size -pv 200 -url %mysiteurl%