Attaches beta-O-GlcNAc (beta-O-N-acetyl-D-glucosamine) residues to the C4 position of poly(RboP)-wall teichoic acids (WTAs). Prefers UDP-GlcNAc as a donor substrate and is specific for poly(ribitol phosphate) WTAs. Can also use UDP-Glc and UDP-GalNAc, but not UDP-galactose or UDP-glucuronic acid. Mediates beta-lactam resistance in methicillin resistant Staphylococcus aureus (MRSA) strains. 4-O-[(D-ribitylphospho)(n)-di{(2R)-glycerylphospho}]-N-acetyl-beta-D-mannosaminyl-(1->4)-N-acetyl-alpha-D-glucosaminyl di-trans,octa-cis-undecaprenyl diphosphate + n UDP-N-acetyl-alpha-D-glucosamine = 4-O-([2-N-acetyl-beta-D-glucosaminyl-1-D-ribitylphospho](n)-di{[2R]-1-glycerylphospho})-N-acetyl-beta-D-mannosaminyl-(1->4)-N-acetyl-alpha-D-glucosaminyl di-trans,octa-cis-undecaprenyl diphosphate + n H(+) + n UDP Cell wall biogenesis; poly(ribitol phosphate) teichoic acid biosynthesis. Homotrimer. Expression is up-regulated in the presence of beta-lactams. Deletion mutant has no growth or cell division defects, but mutant shows increased susceptibility to beta-lactams. Deletion of the gene leads to the production of only alpha-O-GlcNAcylated WTAs. TarS is a unique target for compounds used in combination with beta-lactams to treat MRSA infections. Belongs to the glycosyltransferase 2 family.