350z ECM

Hi, new to the site and 350z, but not to wrenching on cars of many types.
I need to replace the the dash wire harness and ECM in a 2005 I bought.
No ECm with the car and a butcher up wire harness came with the car.
Are all year ECM's compatible with this 2005 and will I have to have it reflashed if purchased from a salvage yard or Ebay ?

Welcome- however, if you bought this Z thinking it would be an easy, low-cost project car to get back on the street, I fear whether this will be the case. The ECM runs many systems on your Z, and needs multiple sensors to be connected in. Depending on the options in your Z, the '03-05 models used the VQ35DE engine and needs the ECM and harness to match.