Passing a Switch parameter using Splatting

suggest change

To use Splatting to call Get-Process with the -FileVersionInfo switch similar to this:

Get-Process -FileVersionInfo

This is the call using splatting:

$MyParameters = @{
    FileVersionInfo = $true
}

Get-Process @MyParameters

Note: This is useful because you can create a default set of paramaters and make the call many times like this

$MyParameters = @{
    FileVersionInfo = $true
}

Get-Process @MyParameters -Name WmiPrvSE
Get-Process @MyParameters -Name explorer

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents