Fixed Write-Message ErrorRecord parameter
Fixed Write-Message ErrorRecord parameter

Would throw an exception due to bad input handling when passing an exception to log
kozloski/dbatools,Splaxi/dbatools,alevyinroc/dbatools,dsolodow/dbatools,sqlpadawan/dbatools,wsmelton/dbatools,SirCaptainMitch/dbatools