Lots of changes, two new functions invoke-sqlquery, invoke-sqlcommand to replace all of the internals of the original functions. Updated the original functions to use the two new functions.