My Profile Photo

duffney.io


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


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


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


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


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


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