The aim of this study was to monitor the presence of Shiga toxin (Stx)-producing Escherichia coli in dairy farms authorized to sell raw milk and other farms, located in the same area, which sell milk to industry or use it to produce Parmesan or Grana cheese. Our research was focused on the serogroups O157 and O26, which are the most common in human cases in Italy and genetic markers that characterize the strains that can cause hemorrhagic colitis and hemolytic uremic syndrome (EHEC) in humans. Overall, 255 bulk-milk and 225 milk filter samples were screened for the presence of Shiga toxin genes (stx1 and stx2), O157 and O26 serogroups by using PCR. The samples were collected in 193 bovine dairy farms located in Northern Italy, including 32 farms selling raw milk to consumers. According to the preliminary PCR screening test, 32 out of 255 (12.5%; CI95%, 8.7% to 17.3%) bulk milk samples and 68 out of 225 (30.2%; CI95%, 24.3% to 36.7%) milk filters were positive for stx genes. Of the 32 milk samples that were stx-positive, 4 (1.6%, CI95%, 0.4% to 4%) were also positive by PCR for the rfbEO157 gene and 6 (2.4%, CI95%, 0.9% to 5.1%) were positive for the wzxO26 gene. The culture detection method, which was based on the immunomagnetic separation, achieved isolation rates of E. coli serogroups O157 and O26 in 25–67% of the milk samples that tested positive by PCR for these serogroups. STEC O26 was detected in one milk filter (1.6%) from a farm that sells raw milk to consumers directly and one sample (1.4%) of bulk milk intended for pasteurization. The presence of STEC O157 was also detected in 2 milk filters (1.7%) from farms that use milk to produce Grana cheese. All the STEC stains O157 and O26 isolated carried the genes eae and espK and genes belonging to the pathogenicity island OI-122 (efa1/2, sen, pagC), which are markers suitable for screening the human virulent EHEC strains. These virulence markers were also detected in the three strains of stx-negative E. coli O157 isolated from two filters and one milk sample. These strains could be therefore EHEC strains that have lost the stx genes (EHEC-derivative strains). Concern arise for the presence of EHEC O26 and E. coli O157 isolates that are suspected to be an EHEC-derivative in the milk filters sampled in farms that are used to sell raw milk to consumers and in other dairy farms.