Microglia and central nervous system (CNS)-associated macrophages (CAMs), such as perivascular and meningeal macrophages, are implicated in virtually all diseases of the CNS. However, little is known about their cell-type-specific roles in the absence of suitable tools that would allow for functional discrimination between the ontogenetically closely related microglia and CAMs. To develop a new microglia gene targeting model, we first applied massively parallel single-cell analyses to compare microglia and CAM signatures during homeostasis and disease and identified hexosaminidase subunit beta (Hexb) as a stably expressed microglia core gene, whereas other microglia core genes were substantially downregulated during pathologies. Next, we generated HexbtdTomato mice to stably monitor microglia behavior in vivo. Finally, the Hexb locus was employed for tamoxifen-inducible Cre-mediated gene manipulation in microglia and for fate mapping of microglia but not CAMs. In sum, we provide valuable new genetic tools to specifically study microglia functions in the CNS.