Weinberger did serve in the military. His military service occurred during World War II. Weinberger served in the United States Army from 1941-46. Specifically, he served as an artillery officer in Europe and achieved the rank of captain.
Caspar Weinberger: The Maverick Politician - A Quiz on the Life and Legacy