Upvote:1
The process for getting permanent residency inside the US is Adjustment of Status; the process for getting permanent residency at a US consulate abroad is Consular Processing. Both of those processes require a visa number to be available first. The spouse of a permanent resident is in the F2A category, which has a wait for visa numbers of around 2 years. That means you have to wait until about that long after filing the I-130 petition (which can only be filed after the marriage) before she can proceed to either AOS or CP if she qualifies. (For AOS, in some months, it is possible to file a little earlier, but it doesn't make a significant difference in your case.)
Since she is not in the Immediate Relative category (spouse, unmarried under-21 child, or parent of US citizen), she is required to be in status at the time of applying for Adjustment of Status. If she is on B2 visitor status, that is usually for no more than 6 months, far shorter than the 1-2 year wait for visa numbers before she can file. If she is a visitor on the Visa Waiver Program, she is not allowed to do Adjustment of Status at all since she is not in the Immediate Relative category.
The proper way would be for her to leave on time and wait to do Consular Processing abroad when a visa number becomes available. If she stays illegally in the US, there is no way for her to get permanent residency no matter how long she waits, unless you become a US citizen.