2 years seems excessive, but it depends on why they don't want you around, what your position is and if there's a no-compete clause in your contract. Sometimes the reasons you shouldn't be around are purely political and have nothing to do with your performance.