IT/Dev Connections 2016 Demos

I had a great time in Las Vegas a few weeks ago presenting at IT/Dev Connections. If you attended one of my sessions, thanks for taking the time. I hope found it time well spent. I tend to offer more demo-intensive presentations with minimal PowerPoint, which no one has complained about yet!

In some of my sessions I included a link to a zip file with the relevant demos and sample code but in case you missed it, or I didn’t provide a link during the event, here is a one-stop shop for all of my material. Continue reading

Computer Certificate tools

In my Pluralsight course on Advanced DSC I used a few functions I wrote to make it easier to work with computer certificates. If you need to encrypt things like passwords in a DSC configuration,  you must some type of certificate thumbprint as well as a copy of the certificate. The idea is that you can use the exported certificates public key to encrypt the password. The remote computer then uses the private key to decrypt.

The functions I wrote for the course were relatively simple, but I always knew I would re-visit them. Now I have. Not only have I extended the functionality, I’ve also turned the functions into a module.

The module contains two functions, Export-MachineCertificate and Get-MachineCertificateThumbprint.  They are very similar in terms of their output, except that the export function does just that, it exports the certificate. I have a hard coded path of C:\Certs but you can change that.

The commands rely on the PKI module that you should have on Windows 8 and later.

Exporting a certificate

By default, the function will also test if the certificate is valid, although you can skip that test.

If you just want the thumbprint, you can use the other command.

Getting a certificate thumbprint

I suppose I could have combine the functions into one.  In fact, as I write this I can think of a few other changes I might have made but I think I will leave things as they stand.

You can find the files on GitHub.

Practicing PowerShell in Helsinki

helsinkiI am very happy to announce that in addition to my appearance at the MVP-AllStars conference on 9 June 2015 in beautiful Helsinki, Finland but that I will be following it with a 2 day, intense PowerShell workshop aimed at Järjestelmänvalvojat (system administrators or IT Pros). I think this is going to be a blast and if you are any where in the region, or can hop on a plane, train or ferry, I hope you’ll consider attending.

The workshop is intended to provide enough practical PowerShell knowledge and experience that you can begin using it effectively the next day. Somehow I’m hoping I can cover the following material.

Day 1

  • What is PowerShell and Why It Matters
  • Understanding the PowerShell paradigm
  • The Power of a PowerShell Provider
  • Learning the PowerShell Language
  • PowerShell Remoting
  • WMI and CIM

Day 2

  • Exporting, Importing and Converting Objects
  • PowerShell Scripting Concepts and Security
  • Creating Effective PowerShell Scripts and Functions
  • PowerShell in Action
  • Getting Started with Desired State Configuration (DSC)
  • Questions, Answers and Next Steps

I don’t do many public classes so you won’t want to miss out. You can learn more at Seating will be limited and there is early-bird pricing so please don’t wait.

New PowerShell Pluralsight Course

WatermarkLogo151x79I am so happy to announce that my first course under the Pluralsight badge has been released. My latest course is titled PowerShell v4 New Features. This course is aimed at IT Pros with previous experience using PowerShell, especially PowerShell v3. The course runs just under 3 hours (although it felt much longer than that while preparing it 🙂 ) and covers just the new bits that have changed from v3 including an introduction to Desired State Configuration (DSC). I provide enough information to get you started.

If you need to get caught up on v3 first, you can find my other courses on my author page. I hope you find my new course helpful.

DSC Resource Snippets

talkbubbleA few days ago I posted a PowerShell script that would generate a DSC configuration template. The idea was to generate all the code you might need and let you whittle it down to just what you need. On my primary system, I don’t have any community or experimental DSC resources so my configuration template script only gets the default resources. Towards the end of the article I mentioned that another option would be to create snippets you could use in the PowerShell ISE. So I did.

In PowerShell 4 Microsoft already includes a simple  DSC configuration snippet. In the ISE,  hit Ctrl+J and start typing DSC and you should see a snippet title DSC Configuration (simple).  I ran my configuration template script and then converted each resource into its own snippet just for you.

Download and extract the .ps1xml files to your Snippets directory, C:\Users\\Documents\WindowsPowerShell\Snippets. That folder may not exist if you have not created of your own snippets. When you start the ISE and press Ctrl+J and start typing DSC you should see a snippet for each resource.


Find the one you want and press Enter. Use these snippets in conjunction with the DSC configuration snippet and you are practically finished with just a few key strokes. Edit and enjoy.