To support a contempt enforcement, orders must be clear
Having read a bunch of these cases, I think that the duties or prohibitions have to be almost but not quite as clear as those needed to support mandamus - e.g. clear, directive shall or shall not language with clear, plain language of what should or should not be done. (though don't have a really good case for the proposition - if someone else does, please share).
Why is this important? Ever read the kind of "enforcement order" that lay Code Enforcement Boards tend to write (even with legal help)?
I saw one that basically said - "stop violating this provision of the code and don't violate any others." That case involved a determination that landowners couldn't possess "Class II" wildlife (stuff that needs special permits) in an agricultural zone district (yeah, right, go figure). But there were probably 20 different species of animial other than goats, chickens and cats, including iguanas, jungle cats, and other exotic but non-regulated animals. Which would violate? What, specifically, did the client have to get rid of? The order didn't say.
That kind of order shouldn't support a code enforcement fine, no less an injunction enforcing the order. But it happens all the time.
But - Practice Tip - remember that judges and administrative bodies do have the inherent authority to correct errors in their orders, at least until the time for appeal or cert runs without a challenge; i.e. you can ask for a modification.
And you need to think about doing it - if you appeal an enforcement action brought against you in court on a "bad" order, you can probably raise this, but if you try to appeal or cert it, it's possible that you could get bounced for not exhausting administrative remedies (even unclear and unbounded ones).