Changed WindowsCredential to credential, removed unused variable, fixed date types.
Changed WindowsCredential to credential, removed unused variable, fixed date types.

sqlpadawan/dbatools,dsolodow/dbatools,kozloski/dbatools,Splaxi/dbatools,SirCaptainMitch/dbatools,wsmelton/dbatools