Medication is applied to the HIV-infected nodes of high-risk contact networks with the aim of controlling the spread of disease to a predetermined maximum level. This intervention, known as pinning control, is performed both selectively and randomly in the network. These strategies are applied to 300 independent realizations per reference level of incidence on connected undirectional networks without isolated components and varying in size from 100 to 10 000 nodes per network. It is shown that a selective on-off pinning control strategy can control the networks studied with limited steady-state error and, comparing the medians of the doses from both strategies, uses 51.3% less medication than random pinning of all infected nodes. Selective pinning could possibly be used by public health specialists to identify the maximum level of HIV incidence in a population that can be achieved in a constrained funding environment.