Attaches beta-O-GlcNAc (beta-O-N-acetyl-D-glucosamine) residues to the C4 position of poly(RboP)-wall teichoic acids (WTAs). 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 Can also use Mg(2+). Cell wall biogenesis; poly(ribitol phosphate) teichoic acid biosynthesis. Homotrimer. Contains a trimerization domain, composed of stacked carbohydrate binding modules, connected by a linker region to the catalytic domain. The trimerization domain appears to be dispensable for UDP-GlcNAc hydrolysis activity, but it may increase poly(RboP) binding affinity. TarS is a unique target for compounds used in combination with beta-lactams to treat MRSA infections. Belongs to the glycosyltransferase 2 family.