Category Archives: PowerShell

Event Receiver does not fire

I wrote an event receiver for a list but it seems not firing when you add/update/delete an item. I used the following Powershell script to see what event receivers that are attached to this list: Add-PsSnapin Microsoft.SharePoint.PowerShell $spWeb = Get-SPWeb … Continue reading

Posted in SharePoint 2010, PowerShell | Leave a comment

Create a cross-site lookup field using PowerShell

Sometimes you need to create a lookup field to look up a list in another site (not the parent site). This is how  you can do it using PowerShell: On SharePoint server, run PowerShell as admin: Add-PsSnapin Microsoft.SharePoint.PowerShell $targetWeb = … Continue reading

Posted in PowerShell, SharePoint 2010 | Leave a comment

“Content Types that are available to this Document Set have been added or removed. Click here to update the Document Set.”

Use the following script to update all document sets. This method updates the Document Set item with any changes made to allowed content types. For its content type, it also adds the newly added content types to the list so … Continue reading

Posted in PowerShell, SharePoint 2010 | Leave a comment

SharePoint Solutions – Add, Deploy, Retract and Remove using PowerShell and STSADM

When you want to update a solution, sometimes you can’t retract a solution from Central Admin. Error messages: “A feature with ID xxxxxxxxx has already been installed in this farm. Use the force attribute to explicitly re-install the feature.” Do … Continue reading

Posted in PowerShell, SharePoint 2010, STSADM | 1 Comment