PowerShell Splatting – Nice way to simplify your scripts

Currently I´m building PowerShell WMI Explorer and because of this tool supports alternate credentials, then I thought how can I simplify my Get-WmiObject queries and the solution is Splatting 🙂


PowerShell splatting allows you to create Function or CMDLET parameters dynamically. Below example shows how you can build dynamically Get-WmiObject parameters. You can use this script to query WMI information from the local machine or from the remote computer and if necessary you can also add alternate credentials.

By | 2013-06-08T10:58:54+00:00 June 8th, 2013|Powershell, Scripting & Development|0 Comments

About the Author:

Kaido Järvemets
Configuration Manager MVP

Leave A Comment