Before I repot plants in soil that has been sitting in a bag in the garage or outdoors, I sterilize it and kill any hidden bugs by putting it in the oven at 200 degrees F for about an hour. In a pinch, I'll wet soil throughly and microwave covered for a few minutes or until steaming. Cool before use, of course.
Done it too! Boy, does the house smell after, like you have added boiling water to dirt!
Do it outdoors because it makes the house reek!
I can't imagine how time consuming it would be to microwave a bag of dirt by microwaving it! To me it would be much easier to buy a new bag of soil.
I don't sterilize my garden soil. That would be impractical. I do sterilize soil for some 'important' potted plants and for all my seedlings I start indoors. I use a microwave oven, also. I use sweet smelling woods dirt and leaf mold. When doing this, my home doesn't smell like L'Air Du Temps, but it doesn't 'reek', either.
I realize many people do not have access to sweet smelling woods dirt, but if I purchased a bag of potting soil and it caused the house to reek when sterilized, I would be switching brands. A good potting soil should not stink when heated.