$list = (get-spweb http://sharepoint/sites/test).lists['somelist'] $def = $list.EventReceivers.Add() $def.Assembly = "MyReceiverAssembly, Version=188.8.131.52, Culture=Neutral,PublicKeyToken=a00000000a000ce0" $def.Class = "MyReceiverAssembly.MyReceiverClass" $def.Type = [Microsoft.SharePoint.SPEventReceiverType]::ItemAdded $def.Name = "My ItemAdded Event Receiver"; $def.Synchronization = [Microsoft.SharePoint.SPEventReceiverSynchronization]::Synchronous $def.Update()
Recently I found that my AWS EC2 instance performance degrades after applying windows updates. The reason is that I created the new AMI right away after Windows Update complete.
Now each time new instance started, I have the high CPU usage due to the .NET Runtime Optimization Services.
The best practice here is to wait till this service done its job. In my environment it takes up to 30 minutes!
Enable-SPFeature -Identity DocumentSet -url http://YourSharepointServer