2 Samuel 11:
But if Joab was doing it against his conscience, then he was partly guilty of Uriah's death.
A similar incident happened with King Saul in 1 Samuel 22:
If he did it against his conscience, then he was. If he didn't have a conscience, then he was condemned already, no matter what he did.
If Joab was simply following David's order with a clear conscience, then he was just carrying out an execution order from his king. I don't think he sinned.14 In the morning David wrote a letter to Joab and sent it by the hand of Uriah. 15 In the letter he wrote, “Set Uriah in the forefront of the hardest fighting, and then draw back from him, that he may be struck down, and die.” 16 And as Joab was besieging the city, he assigned Uriah to the place where he knew there were valiant men. 17 And the men of the city came out and fought with Joab, and some of the servants of David among the people fell. Uriah the Hittite also died.
But if Joab was doing it against his conscience, then he was partly guilty of Uriah's death.
A similar incident happened with King Saul in 1 Samuel 22:
Following their conscience, these servants disobeyed the king's order.17 the king said to the guard who stood about him, “Turn and kill the priests of the LORD, because their hand also is with David, and they knew that he fled and did not disclose it to me.” But the servants of the king would not put out their hand to strike the priests of the LORD.
Was Doeg guilty?18 Then the king said to Doeg, “You turn and strike the priests.” And Doeg the Edomite turned and struck down the priests, and he killed on that day eighty-five persons who wore the linen ephod. 19 And Nob, the city of the priests, he put to the sword; both man and woman, child and infant, ox, donkey and sheep, he put to the sword.
If he did it against his conscience, then he was. If he didn't have a conscience, then he was condemned already, no matter what he did.