Popular Posts

Recent Posts

How to remove SharePoint User Groups with PowerShell

For deleting SharePoint groups you can use SharePoint Designer. For this you should open site in SPDesigner, in left column goto “Site Groups”, select groups for deleting and press Delete button on keyboard or in ribbon. But this process doesn’t always work. And when I wanted to remove user groups SPDesigner hanged and reported error […] Read more»

SharePoint

How to sort Modx Ditto documents ID when using &documents?

I found very nice extender for Ditto Modx. When using snippet Ditto with custom page Ids, you have strange sorting – I haven’t even understood which one. For sorting documents as you write in &documents=`[x, xx, xxx, xxxx]` you shoul use the ditto-extender below. Write Ditto callout this way: [[Ditto? &tpl=`razdel200` &documents=`[1,4,3,5,212,23,44]` &extenders=`customsort`  ]] You should […] Read more»

ModX

Delete SharePoint sites recursively

Today I tried to delete a SharePoint site (SPWeb) with child sites inside. I tried to delete it form administrator interface but I got an error. Something was wrong with templates or site structure. So I decided to use PowerShell for SharePoint. Read more»

SharePoint

Correct way to delete all SPListItems

SharePoint 2016 Logo

Today while coding a Sharepoint timer job I needed to clean my SPList. I tried common ways of deleting using “foreach” and “for i++ …” but I got the error. I couldn’t delete list and create it again in timer job because of custom views. As usually for SharePoint solution is not ordinary 🙂 Read more»

SharePoint

First and last day in month

While coding a solution in .Net to parse billings I needed to find first and last days in month. The first day is easy – just set “01” for day. But for last day there is nice solution, hope it’ll help you DateTime today = DateTime.Today; DateTime endOfMonth = new DateTime(today.Year, today.Month, 1).AddMonths(1).AddDays(-1); Read more»

.Net & C#