SharePointConsole
I wrote a Console application, which will allow you do some common tasks for your SharePoint environment. stsadm lacks some functionality like recyling all list items from a list…
Just copy the exe to your SharePoint Server, and execute it with an account which has the appropriate rights on your farm.
Usage:
SharePointConsole http://siteurl[/weburl] Command [Parameter1 Parameter2]
The SharePointConsole has the following parameters:
- EnumContentTypes
- CreateContentType
- RenameContentType
- DeleteContentType
- DeleteAllListItems
- ShowInNewForm
- ShowInEditForm
- ShowInDisplayForm
- DeleteAllVersions
- RecycleAllVersions
- SetTitleWithFilename
- SetSearchCenterUrl
- SystemUpdate
- FeatureManager
- EmptyRecycleBin
EnumContentType:
Returns all content types from the specified sitecollection.
CreateContentType newName [Parent ContentType]:
Creates a new content type and inherrits from an exiting one, if a parent content type is specified.
RenameContentType contentType newName:
Renames a content type
DeleteContentType Name:
Deletes a content type
DeleteAllListItems ListName:
Deletes all listItems from the specified list (use the displayname)
RecycleAllListItems ListName:
Recycles (moves to Recycle Bin) all listItems from the specified list (use the d
isplayname)
ShowInNewForm ListName FieldName bool:
Changes the visibility of a field in the NewForm
ShowInEditForm ListName FieldName bool:
Changes the visibility of a field in the EditForm
ShowInDisplayForm ListName FieldName bool:
Changes the visibility of a field in the DisplayForm
DeleteAllVersions ListName:
Deletes all version except the current one
RecycleAllVersions ListName:
Recycles all version except the current one
SetTitleWithFilename ListName:
Sets the Title of all Documents with its filename without extension
SetSearchCenterUrl SearchCenterUrl:
Sets the SearchCenterUrl for an entire WebApplication
SystemUpdate ListName SleepTime itemID:
Hit each ListItem and do a SystemUpdate(false) to call attached EventHandlers. With SleepTime you define how many seconds to wait, before working on the next ListItem. If the itemID is != 0, only that item will be updated
FeatureManager featureID Enable/Disable [AllSites|AllWebs|Farm] :
Enable or Disable a feature by its ID. The optional paramter AllSites enables the feature on all sitecollections AND webs, AllWebs only in all webs of the sitecollection and Farm in the whole farm
EmptyRecycleBin
Empties the Recylce Bin for the site collection (from all stages and all webs!)
Update 28. May 2009
New commands added.
Download the SharePointConsole