by John Chapman | Aug 7, 2012 | Coding, PowerShell
In my previous couple of posts I have been discussing how to write a custom PowerShell Cmdlet in C# ([PowerShell] Write a Custom PowerShell Cmdlet in C# and [PowerShell] Using Common Verbs for Custom PowerShell Cmdlets in C#). When developing custom PowerShell Cmdlets...
by John Chapman | Aug 3, 2012 | Coding, PowerShell
In my previous post, [PowerShell] Write a Custom PowerShell Cmdlet in C#, I mentioned that the commond verbs built-in to PowerShell should be used whenever possible. [csharp]using System; using System.Management.Automation; namespace MyPsCmdlet {...
by John Chapman | Aug 3, 2012 | Coding, PowerShell
Particularly with SharePoint 2010, I have become a huge fan of Microsoft PowerShell. In addition to writing complex PowerShell scripts (.ps1 files), I have found it very useful to write my own C#-based PowerShell Cmdlets to use in my scripts. This basic tutorial...
by John Chapman | Apr 25, 2012 | Coding, SharePoint
By default timer jobs in SharePoint are scheduled for all servers in a SharePoint farm and whichever server picks up the job first is the one that runs it. There may be times when creating a custom timer job for SharePoint 2010 that you want to specify the server in...
by John Chapman | Dec 30, 2011 | Coding
I tend to use LINQ for just about everything I can. Many times this involves populating ASP.NET GridViews from code with anonymous types from LINQ. For example: [csharp]var linqQuery = from p in context.Table select new { ID = p.Id, Name = p.LastName + “,...
by John Chapman | Dec 30, 2011 | Coding
Over on his blog, Adam Anderson posted a very nice helper class that allows you to use SQL-Like Sort Expressions in LINQ. I have found this to be invaluable in a number of projects and I am simply reposting his code in the hope others will find it useful. Example...