Press "Enter" to skip to content

The Readability Benefit of Splatting in Powershell

David Seis simplifies the code a bit:

Have you ever written a PowerShell command so long that it stretched across the screen? Or had to update a script and hunt through a long parameter list to change a single value? Splatting solves that problem by letting you pass multiple parameters to a command using a single variable.

Read on for some examples, including a good example of how to make similar cmdlet calls easier to read.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.