The Duke is probably the most pinnacle character in "Measure for Measure". Within the play his character sets out to solve the problem of the lax laws within his state of Vienna and to do this he has to disguise himself as a friar and place Angelo in power.
The way the Duke acts throughout the play could be used to say that the Duke is playing a game with many of the characters and there emotions. With Lucio for example he tells him he's going to hang him but straight away afterwards he takes the threat away. This would suggest that the character enjoys playing with people, Shakespeare could have put this in to make the character seem less righteous or to highlight his ineffectiveness to carry out punishments.
The Duke is an ineffective ruler we know this because he couldn't control the laws before the play and fails to punish Angelo for his crimes as he is persuaded not to by Mariana.
This suggests that the laws will become lax again after the play and nothing will have been solved. This however could also bring in the question of the Dukes real purpose of going undercover which could have been instead to expose Angelo or marry Isabella but the second is very unlikely.
The Duke is a bit of a contradictory character and it is hard to tell what is the real Duke this is probably part of Shakespeare's intentions. One of his contradictory moments is at the end when he proposes to Isabella "what's yours is mine and what's mine is yours" as he has previously stated that love is for the young however this may just suggest that he doesn't love Isabella and that he wishes to marry him to help him rule but in at the time this would have been an unlikely meaning.
The Duke seems to enjoy being the friar this could be because he still gets respect and a certain amount of power however it isn't as scrutinised by others as they don't question him. The Dukes character places himself in the role of the Friar to help him control the situation however he abuses its privileges by hearing Marianas confession
"I have confees'd her and know her virtue" this goes beyond his role and is a very questionable act. Shakespeare could be doing this to highlight the Duke as a more self-righteous character who believes he is doing good this could make the audience view him in that way or a an arrogant medalling man.
So the Duke is a very hazy character who often burrs the line of good and bad within the play and Shakespeare uses him to show the good qualities such as a desire to solve the problem however the character is contradicting and often plays with other characters and there emotions to a negative affect.