My Profile Photo

duffney.io


DevOps Engineer | Pluralsight Author | Speaker | Blogger | PowerShell Advocate


  1. Getting Started with Invoke-Build

    Table of Contents Table of Contents What is InvokeBuild? PowerShell Module Development Workflow Creating The InvokeBuild Script Creating the Install Dependencies InvokeBuild Task Adding Linting with PSScriptAnalyzer Testing the Code with Pester Updating the Module Manifest Generating an Artifact Sources What is InvokeBuild? Invoke-Build is a build automation tool written in PowerShell. What does that mean? Well, just like anything written in PowerShell the purpose of it is to automate something and in this case...…


  2. Using Module Versions with Invoke-DscResource

    Invoke-DscResource is a cmdlet available in PowerShell version 5 and above. It allows you to run a Dsc resource method without having to generate a mof document or even write a configuration document. In this blog post you’ll learn how to use a ModuleSpecification to tell the cmdlet which version of a resource module to use. Why would you need to do that? By default, the cmdlet will use the latest version of the resource...…


  3. Getting Started with Pester

    Pester is a PowerShell behavior-driven development (BDD) style testing framework. But, really all you need to know about it before getting started, is that it’s a testing framework and it can be used to automate the testing of your PowerShell code. You might think to yourself well what’s the point of that? I already wrote my PowerShell function, all I need to do now is run it and see if it does what I want....…


  4. Configuring an HTTPS Pull Server for Desired State Configuration PowerShell Version 5

    Applies to: Windows PowerShell 5.0 In a previous blog post I walked through the setup of an HTTPS pull server, at the time of the writing there was only one way to setup a pull server with HTTPS. Since that blog post was published, Microsoft has released another version of the Pull server which I’ll refer to as version 2. The offical Microsoft documentation for setting up a pull server can be found here. There...…


  5. How to Add Credential Parameters to PowerShell Functions

    In this blog post I’ll show you how to add credential parameters to PowerShell functions. But before I do that let’s first talk about why you’d want to add a credential parameter to your functions. The purpose of the credential parameter is to allow you to run the function and/or cmldet as a different user, some account other than the one currently running the PowerShell session. The most common use is to run the function...…