IME I would not use PB Blaster anywhere near an electronic switch or component, it can also damage rubber, plastic, or any small circuit boards it comes in contact with.
You want to use CRC Quick Dry electronics cleaner or a similar product (100% Hexane). A good rule of thumb to follow is to never use carb or brake cleaner or penetrating oils near electronics or rubber components.
I had zero luck cleaning a door switch, it appears that over time the switch extended too far out going past it's internal contacts. So I can push the switch back in from it's extended position just a fraction and the interior light comes on as it should, but let go and the light goes out.
What I did with my transfer case switch was to remove the switch, work the detent ball in and out while spraying the electronics cleaner aimed at the ball, clean out the harness and switch connectors/contacts with the spray, reinstall the switch, reconnect the harness connector. FWIW.