If you receive your 2-year green card through your spouse, then it is VERY IMPORTANT TO REMEMBER, that 90 days before the expiration of the your card (90 days short of your 2-year anniversary of getting your card) you can file an I-751 Petition. You have until the expiration of your card to file that I-751. If you fail to file the I-751, for any reason, USCIS will terminate your conditional permanent resident status and likely issue you a Notice to Appear (NTA) to go to immigration court and prove why you should not be deported.
If you miss your 90 day filing window, don’t panic, there are sometimes excuses for filing after that time period, but you must specifically ask USCIS to accept your late-filed I-751 and give them a good reason why. If you don’t ask them to accept your late I-751 and don’t give them a good reason why you filed late, they will likely deny your I-751. If you missed your 90 day window, or preferably before you miss your window, consult with an experienced and preferably Board Certified immigration attorney to review your case and give you advice (like me: https://www.slgattorneysflorida.com/john-gihon.html). Or don’t talk to an attorney and risk wasting your money and time and having your Petition denied because you don’t know what you don’t know about immigration law.
Now that you know who has to file an I-751 and when you have to file your I-751, we can discuss how you file it. There are three different ways to file your I-751 and each depends on your marital status at the time you are ready to file (the 90 day window) and the hardship you would face if you were deported.