Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $wUrl = "http://contoso/sites/ITS"
- $w = Get-SPWeb $wUrl
- $l = $w.Lists["Accomplishments"]
- $er = $l.EventReceivers.Add()
- $er.Name = "Update security"
- $er.Type = [Microsoft.SharePoint.SPEventReceiverType]::ItemUpdated
- $er.Assembly = "contoso.accomplishments, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ece777032666aa8f"
- $er.Class = "contoso.accomplishments.AccomplishmentsEventReceiver"
- $er.Synchronization = [Microsoft.SharePoint.SPEventReceiverSynchronization]::Synchronous
- $er.Update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement