The present invention provides methods of using agonists and antagonists of PILRα and PILRβ, respectively, to treat S. aureus infection, in particular, S. aureus infections of the lungs. Also provided are use agonists and antagonists of PILRα and PILRβ, respectively, to prevent such infections.