POWER WINDOWS

For over a year now I have had an annoying problem with the power windows. They only work intermittently. I don't think it is in switch on the driver's door panel as none of the windows work when system is out. Could it be a relay that only works off and on? There is no pattern to the problem. Sometimes windows will work after starting; other times they don't. Sometimes they will work after I have driven a mile or two.