Rob Sewell shows off how easily to splat Powershell parameters with Visual Studio Code:
Well you will know that when you call a PowerShell function you can use intellisense to get the parameters and sometimes the parameter values as well. This can leave you with a command that looks like this on the screen
1 Start-DbaMigration -Source $Source -Destination $Destination -BackupRestore -NetworkShare $Share -WithReplace -ReuseSourceFolderStructure -IncludeSupportDbs -NoAgentServer -NoAudits -NoResourceGovernor -NoSaRename -NoBackupDevicesIt goes on and on and on and while it is easy to type once, it is not so easy to see which values have been chosen. It is also not so easy to change the values.By Splatting the parameters it makes it much easier to read and also to alter.
To learn more about splatting, there’s a whole section in Powershell help on the topic.