We present observations made with the Berkeley-Illinois-Maryland Association millimeter array of the H2S 2(2,0)-2(1,1) and C18O 2-1 transitions toward a sample of four hot molecular cores associated with ultracompact HII regions: G9.62+0.19, G10.47+0.03, G29.96-0.02 and G31.41+0.31. The angular resolution varies from 1.5 to 2.4 arcsec, corresponding to scales of ~0.06 pc at the distance of these sources. High-velocity wings characteristic of molecular outflows are detected toward all four sources in the H2S line. In two cases (G29.96 and G31.41) red- and blueshifted lobes are clearly defined and spatially separate, indicating that the flows are collimated. We also confirm the previous detection of the outflow in G9.62F. Although the gas-phase H2S abundance is not well constrained, assuming a value of 10^-7 yields lower limits to total outflow masses of ~8 Msun, values which are consistent with the driving sources being massive protostars. Linear velocity gradients are detected in both C18O and H2S across G9.62, G29.96 and, to a lesser extent, G31.41. These gradients are observed to be at a different position angle to the outflow in G9.62F and G29.96, suggestive of a rotation signature in these two hot cores. Our observations show that these hot cores contain embedded massive protostellar objects which are driving bipolar outflows. Furthermore, the lack of strong centimeter-wave emission toward the outflow centers in G29.96 and G31.41 indicates that the outflow phase begins prior to the formation of a detectable ultracompact HII region.