I can't speak for the majority of German forces, but he delivered this message to the U-boat crews as the war finished.
The text reads:
“My U-boat men! Six years of U-boat war lie behind us. You have fought like lions. A crushing material superiority has forced us into a narrow area. A continuation of our fight from the remaining basis is no longer possible. U-boat men! Undefeated and spotless you lay down your arms after a heroic battle without equal. We remember in deep respect our fallen comrades, who have sealed with their death their loyalty to the Führer and Fatherland. Comrades! Preserve your U-boat spirit, with which you have fought courageously, stubbornly and imperturbably through the years for the good of the Fatherland. Long live Germany! Your Grand Admiral.”
The way I see it, Doenitz realized that continuing the war was pointless and it was best to surrender rather than have a total collapse of Germany like what happened after the First World War. I would imagine his orders to the other branches of the military would be similar.
The differences are probably that 1) Doenitz had commanded the U-boats for a long time and thus the message reads rather personally and 2) Doenitz may have emphasized honorably laying down arms to discourage a naval mutiny like what happened in 1918.