My Profile Photo

duffney.io


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


  1. 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...…


  2. 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...…


  3. Introduction to Regular Expression (Regex) Lab Setup

    I’m proud to announce my second Pluralsight course titled Introduction to Regular Expression (Regex) has been released! I’ll be honest, this wasn’t an easy topic to cover. Regular expression is considered difficult for a number of reasons, but I found the most challenging part to be a good reference. I put a lot of thought, time, and effort into the logical layout of the course, which I hope makes learning regular expression easier and more...…


  4. I'm Josh Duffney and This is How I Work

    Where are you located? Omaha, Nebraska What is/are your current gig(s)? DevOps Engineer at Paylocity 100% Remote! Pluralsight author Blogger duffney.io Omaha PowerShell User Group Co-Leader What’s one word to describe your work? Exciting What apps, software, or tools can’t you live without? PowerShell, Visual Studio Code, Slack, Cmder, Github, Twitter, and hummm PowerShell. What does your workspace look like? What’s a typical workweek look like? Morning A typical workweek for me starts at around...…


  5. Doubling My Salary a PowerShell Story

    I’ve seen tweets like this before and have even heard compelling stories about how a sys admin learned PowerShell and then got a 10% raise. Hearing stuff like this is always motivating to me, but it’s not only motivating it’s now a reality for me. The same day this tweet went out, I received an offer that has doubled my salary! Now, I’ll admit the offer didn’t double my current salary, but it has doubled...…


  6. A Practical Guide for Using Regex in PowerShell

    Introduction In this blog post you’ll learn severals ways to use regular expression from within PowerShell. You’ve most likely used some of these techniques before. Such as the -match operator or the select-string cmdlet, but probably weren’t aware you were using regular expression. This post will not teach you how to craft complex regular expressions. Instead it focuses on how to use them in PowerShell to find matches, replace text, and to split on matches....…


  7. Create Jenkins JNLP Scheduled Tasks with PowerShell

    In this post, you will learn how to create a scheduled task with PowerShell that connects a Jenkins slave to the master with JNLP. This is just one of several ways to connect a Jenkins slave to a Jenkins master, but I’ve found it to be the most reliable method. Before I begin I am assuming a few things. I’m assuming you have already added the node to Jenkins and that you’ve copied over the...…


  8. Splatting Parameters Inside Advanced Functions

    In Windows PowerShell terms, splatting is a way of bundling parameters to send to a command. Don Jones 2011 Splatting is most often used when providing parameters and their values to a cmdlet in the form of a hashtable. The main benefit of splatting is that it makes the code more aesthetic. They make it cleaner and easier to read. In this post, you’ll learn how to splat parameters inside advanced functions. Advanced Functions without...…


  9. Run Local Functions Remotely in PowerShell

    Have you ever had functions loaded into your local PowerShell session and needed to run them on a remote system? The typical solution to this problem is to copy the code to the remote system and then load the functions on the remote system to use them. What if I told you it is possible to run functions you have stored on your local machine and execute them remotely with Invoke-Command? This post will teach...…


  10. Connecting to SQL with Visual Studio Code

    Applies to: Visual Studio Code Version 1.3.1 It took me about 6 months but I finally stopped using the PowerShell ISE and now only use Visual Studio Code and the PowerShell console. I’ve been working with SQL a lot and in the middle of writing some T-SQL a thought popped into my head, “I wonder if I can connect to SQL with Visual Studio Code?” As it turns out you can and there is a...…