First contribution, I hope this helps.
ipmo $dir\$i 3>$null
ipmo: Short-hand/alias for Import-Module
3>$null: Redirect warnings messages to null
Edit:
I wanted to share a table I found at work while I was looking for the best way to help explain this... But I cant find it now. However, the quick an dirty is you may have already noticed that ipmo doesn't act like the rest of those PWshell cmdlet. It has a total of 4 streams in the bg.
I don't remember 1 and 2. 3 is warning. 4 though, 4 is not necessarily error, but it is error at the same time? I don't remember the exact wording. It is something that bypasses errors.
If I do find that award winning table again I'll be sure to share the blessing.
4>$null
did work. Downside is that the output will be completely lost instead of redirected to the debug stream. – Lapstrake