You can also do that within the hive with a steel needle protective cage. These cages are super convenient and can help you in a lot of ways. You can trap the queen bee in one of these without suffocating it.
eBay