And as an extension, do historians dislike postmodern philosophers as whole, or just Foucault?
It really depends on the epistemological preferences of the historian. Some theoretically inclined historians like him a great deal, or at least they like his insights into power, sexuality, control, etc. More theoretically oriented historians like the analytical tools he gives them to interrogate these phenomena.
More empirically oriented historians tend to find Foucault and other postmodernists too deterministic. Empiricists prefer to let their evidence do the talking, and sometimes that evidence doesn't comport with the theoretical frameworks people like Foucault impose.
I think the best approach is a blend of the two, depending on what your analyzing....
I would not say that historians dislike Foucault. When I studied we have read Foucault to decent degree and we even have a seminary work of interpreting early modern sources through Foucault's concept of bio politics, which was very interesting.
However it must be noted that Foucault, despite working with historical topics and proving a lot of great insights wasn't historian by profession and have tendency of sloppiness in historical methodology and what is most important, of building up hypothesis based on relatively small number of sources.
I would personally say that Foucault is author who is influential in historiography for a good reason, but that applications of his ideas in their totality should be taken with a grain of salt. But that is the case with using basically any theory in historiography, because at the end of they, they are only tools which help us interpret sources.
Out of interest where do you study? I graduated in England and always found there was a overall respect for Foucault even if there is a considerable challenge in apply postmodern theory as a practical methodology
As u/Lady_Nienna alludes to, there's an issue of disciplinary territory-marking in the resistance of (some) historians to theorists such as Foucault. Many late 20th century theorists commonly referred to as 'postmodern' (many of whom can be more accurately described as post-structuralist) began their careers in literary studies, anthropology or sociology, and their theories were often first formed to address questions specific to these fields. These concepts can be usefully transferred into the context of historical study, but historians' reluctance to these theories can be the result of hostility towards perceived incursion from disciplinary 'outsiders'. In fairness to this stance, there is definitely a certain amount of theory-heavy scholarship undermined by insufficiently rigorous historical evidence (others in this thread have pointed out certain flaws in Foucault's own use of history for instance).
Attitudes to theory also tend to vary by period specialisation and country. Medievalists tend to be more theory-averse than early modernists and modernists, and at least in my own country (UK), American scholars tend to be stereotyped as more amenable to theory than UK historians.
In support of OP's question: I read a post in this subreddit not long ago in which someone mentioned Foucault as their source and a collective groan of disdain went through the whole thread. Unfortunately no other reason was given than 'everyone knows this subreddit's opinion on Foucault'.