I am trying to merge two hashtables, overwriting key-value pairs in the first if the same key exists in the second.
To do this I wrote this function which first remo
The open brace has to be on the same line as ForEach-Object
or you have to use the line continuation character (backtick).
This is the case because the code within { ... } is really the value for the -Process
parameter of ForEach-Object
cmdlet.
-Process
Specifies the script block that is applied to each incoming object.
This will get you past the current issue at hand.