His next active service, still under Trenck, was in the Silesian mountains in 1745 (during the Second Silesian War against Prussia), in which campaign he greatly distinguished himself as a leader of light troops. He was present also at the Battle of Soor. He retired shortly afterwards, owing to his distaste for the lawless habits of his comrades in the irregulars, and after long waiting in poverty for a regular commission he was at last made a captain in one of the frontier regiments, spending the next ten years in half-military, half-administrative work in the Karlovac district on the Military Frontier. At Bunić, where he was stationed, he built a church and planted an oak forest now called by his name. He had reached the rank of lieutenant-colonel when the outbreak of the Seven Years' War called him again into the field. From this point began his fame as a soldier. At first rejected by General Wilhelm Reinhard von Neipperg, he soon was promoted colonel at the behest of Chancellor Wenzel Anton Kaunitz and distinguished himself repeatedly. He drew attention at the small but much reported night raid on Ostritz on 1 January 1757 and during that year fought in Bohemia and Saxony under Feldmarschall Maximilian Ulysses Browne and became a "Generalfeldwachtmeister" (equivalent to major-general) of cavalry as well as a knight of the newly founded Maria Theresa Military Order.