I wouldn't trust the trash bag to keep the PC and switches dry for very long. UV will quickly disintegrate the trash bag, as those are meant to be biodegradable. Even though rain may not be able to get in, soon humidity will. Also, many small insects and creatures will love to crawl up inside...