Author Posts

April 29, 2016 at 10:59 pm

I'm looking to have a play with C# with PowerShell . I have no experience with C#, wondering of anyone could recommend a book that might be helpful.thanks !

April 30, 2016 at 2:02 am

Hi Graham, maybe Doug's book could be helpful to you:

And if you have a Pluralsight account, you can check out this course (it's on my to-do list 🙂 ):

April 30, 2016 at 2:28 am

Thanks Richard, funny you should mention that book, I purchased it from Amazon this morning !

April 30, 2016 at 5:41 am

Hi Graham!

There are a few ways you could go about this. Richard mentioned the first: You could use C# to write PowerShell Cmdlets. You would certainly learn a bit about both PowerShell and C#, but that might be quite a steep task for your first dabble in C#.

Another option would be to just learn the basics of C#. You could compile and use C# on the fly in PowerShell, use csc.exe to compile your C# code, or play around with VS Code or Visual Studio itself – the community edition is a great free resource to learn with, but I'm personally starting to lean towards VS Code.

As for resources, I'll let someone more knowledgeable answer – personally, I looked for free resources and experimented.

Good luck!

May 1, 2016 at 12:21 am

Thanks Warren that's a good post and a couple of useful links. How do you say C#, is it 'C plus'? Is there a huge differance between C# and F#? Seems like C# had similar syntax to powershell.

May 1, 2016 at 3:00 am

You can create classes using inline C# and compile them through Add-Type to give you a really quick way to get started

May 1, 2016 at 3:29 am

Excellent, thanks Richard.