Graphene nanomeshes (GNMs) are porous structures that have attracted theor. and exptl. interest over the past decade.Pores of pristine graphene nanomeshes must be passivated by some species (X) to give chem. stable structures (X-GNM).Here, we consider semiconducting GNMs passivated with H, N, and O.We study substitutional implantation of X-GNM with transition metal elements M (M=Sc, Ti, V, Mn, Co, Ni, Cu, Zn), taking into account various doping locations from the center of the pore (P1, P2, P3, P4 and P5 located at 11.47 Å, 10.03 Å, 7.34 Å, 5.57 Å, and 5.98 Å, resp.).We seek to understand how altering the position of the dopant can influence the electronic and magnetic properties of GNM using d. functional theory.The pore induces new symmetries compared to the parent graphene structure, requiring the consideration of various doping positions in the X-GNM unit cell.The doped H-GNM structures remain planar, whereas the M atoms in the (N, O)-GNM structures protrude from the plane.The M-(N, O)-GNM systems generally demonstrated stability greater than that of the M-H-GNM, with Co-H-, Ti-(N, O)-GNMs being the most stable structures.We find that the electronic properties and magnetization of the M-X-GNM are M- and X-dependent.Structures can be semiconductors, diluted magnetic semiconductors (DMSC), and metals.Notably, we find that the Ti-X-, the Ni-(N, O)-, and the Zn-N-GNMs are semiconductors, irresp. of the doping location.The (Mn, Co)-(N, O)-, V-(H, O)-, and Cu-N-GNMs are DMSCs, while the (Sc, Co, Cu)-H- and Cu-O-GNMs are metals.The V-N-GNM at position P2 and Co-O-GNM at position P4 are half-metallic systems, and can thus be used in spintronic applications.Our results can be valuable for designing graphene-based semiconductor and spintronic devices.