Aaron Bertrand provides more background on the evolution of ParamParser, a PowerShell module that helps parse parameters from stored procedures and functions.
There is a very common anti-pattern you should avoid, involving updating a row if it exists and inserting it if it doesn't. See how to avoid race conditions and deadlocks.