Nov 29, 2008

Manage SharePoint WebParts with PowerShell

  • Get the WebPart Manager:

image

The function get-spweb is defined in my PowerShell profile.

  • List all web parts on the page

image

image

  • Update the "Site Image" - Web Part's image

image

image 

  • Add a "Content Editor" Web Part

image 

image

Download the example.

Nov 26, 2008

Unit Testing with SharePoint

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.

I'm curious testing it...

Nov 11, 2008

Released: SharePoint PowerEventReceivers 1.0

I've just released the PowerEventReceivers 1.0 on iLove SharePoint. Now you can write EventReceivers with PowerShell-Script!

Features:

  • All events from the SPItemEventReceiver class
    • ItemAdding, ItemUpdating, ItemDeleting, ItemCheckingIn, ItemCheckingOut, ItemUncheckingOut, ItemAttachmentAdding, ItemAttachmentDeleting, ItemFileMoving, ItemAdded, ItemUpdated, ItemDeleted, ItemCheckedIn, ItemCheckedOut, ItemUncheckedOut, ItemAttachmentAdded, ItemAttachmentDeleted, ItemFileMoved, ItemFileConverted, ContextEvent
  • All events from the SPListEventReceiver class
    • FieldAdded, FieldAdding, FieldDeleted, FieldDeleting, FieldUpdated, FieldUpdating
  • Anything PowerShell can do...

Quick Start:

  • Deploy the solution
  • Activate the Feature

image

  • Go to the list settings of any list or document library

image

  • Choose Power Item Event Receiver
  • A Quick Start Guide is included

image

  • Enter the following script to deny deletion of list items

image

  • Save
  • Now, try to delete a list item...

image

  • ...

image

  • The End

This is just to give you an idea - just be creative...

Please be carefull with the event receivers, they will run with the credentials of the application pool. Although only site collection admins are permitted to edit the script, the script will run with higher privileges! Any idea to improve the security would be appreciated - maybe using a local machine group? What do you think?

Enjoy,

Christian

Nov 10, 2008

Event Pictures "Auf die Pole Position mit Data One"

The event was really great. Thanks to all!

That's me and Severin Canisius from Jack Wolfskin.                             more pictures