Every time I switch to a new cell phone I’ve had to disable 2-factor authentication on all my accounts in order to set them up on the new device. I just switched again and decided to make it easier. I had previously saved the secret keys for the various accounts in a secure location for just such a reason. You’ll need those keys for this solution to work.
The solution is a QR code generator.
Visit the page on your desktop and type the name, user and secret key, then point your mobile device at your monitor to scan the code into Google Authenticator (or whatever app you’re using to generate the six-digit codes).