Blind Betrayal

Blind Betrayal is a Brotherhood of Steel main quest and achievement/trophy in Fallout 4.

Detailed walkthrough
Requirements: After completing Liberty Reprimed the Sole Survivor is ordered to report to the Prydwen immediately. Once aboard Elder Maxson confronts the Survivor, demanding to know if they were aware Paladin Danse was a synth. He reveals that the network hack on The Institute's mainframe provided indisputable proof Danse is not human, but instead is a construct by the unit designation M7-97. The Survivor then is given several medium-difficulty persuasion checks to convince Elder Maxson they did not know Danse's true nature.

The Sole Survivor is then ordered to find Danse, who has gone AWOL, and execute him. The Survivor meets with Proctor Quinlan to work out a way to track Danse down, but they are interrupted by Scribe Haylen. Haylen then pulls the Survivor aside, makes a plea to the Survivor on Danse's behalf, and directs them to a previously decided upon fallback location: Listening Post Bravo.

After dispatching the security measures (two exterior turrets, one exterior protectron, and three additional protectrons down the elevator), the Survivor locates Danse inside the bunker. There they must decide how to proceed.

Plan A: The Last Danse
The Survivor may execute Danse with or without speaking to him, alternatively one can just let him commit suicide. On his body they will find a synth component and Danse's holotags. Collect the tags, return to The Prydwen, and inform Elder Maxson the deed is done.

Plan B: One Last Danse
Refuse to execute Danse. Danse will protest, insisting synths are abominations and that he must be made an example of. Passing a medium-level persuasion check will convince him he is no threat to humanity and he should flee the Commonwealth. Danse gives the Survivor his holotags to appease Maxson.

Exit the bunker. Elder Maxson is waiting outside, having followed the Survivor for fear they would prove insubordinate. From here there are three options:
 * Concede to Maxson and kill Danse. Danse will submit peacefully.
 * Fail to convince Maxson to spare Danse OR request he perform the execution himself. Maxson will kill Danse.
 * Persuade Maxson to let Danse live. Maxson will reluctantly agree, but will exile Danse from the Brotherhood. As a known synth Danse will be fired upon on sight by Brotherhood soldiers.

After a begrudging agreement, the Sole Survivor is left with Danse. One can:
 * Tell him to stay (he remains in the Commonwealth).
 * Beckon him to accompany the Sole Survivor as a companion.

Whatever decision is made, return to The Prydwen. Speak to Maxson to receive the rank of Paladin. The Sole Survivor will also be given all of Paladin Danse's belongings, including his living quarters and his personal power armor.

Bugs

 * Upon arrival at the bunker, Danse may be wearing no clothes.
 * If you already have a set of power armor on the rack Danse's suit defaults to, his will not appear (although the inventory screen will flicker when you look at it). However, if you enter the suit you will enter Danse's - leaving your old one behind.
 * If Paladin Danse was your companion when starting Blind Betrayal, he may still be invincible when you encounter him in the bunker. One potential fix is to convince him to live, then hand the execution order to Elder Maxson, which will result in the quest progressing.
 * Once Elder Maxson arrives in the Vertibird after exiting the listening post, he starts walking off into the distance making it very difficult to enter dialogue with him. One potential fix is to continually step in front of him and prevent him from moving too far away from Danse, allowing Danse to be spared or executed by Maxson. If he does get away, the quest can be completed by executing Danse personally and finding Maxson to the north and briefly talking to him to return him to his quarters. Alternativly, on PC, select Maxson in the console and use the command to take control of him to stop him walking away and complete the dialogue. Use the  command again to return him back to AI control. You may need to use  to return control to the player if you use this method.
 * If the Institute is destroyed by the Minutemen, Elder Maxson will say he is busy and will refuse to speak to the player, therefore he cannot give the quest. Also in the police station, Scribe Haylen's dialog will suggest you have completed the quest even if you haven't. Danse will remain in any settlement the player has left him in and he will continue his normal dialog and will stay in his power armor.
 * Upon regaining Danse's services as a companion, his affinity may be reset to "toleration" regardless of his attitude toward you prior to this quest and in spite of the huge affinity bonuses received by sparing him, leading to a conversation in which he criticizes your behavior and advises you to change your ways.