Persons with cystic fibrosis (PwCF) suffer from pulmonary exacerbations (PEx) related in part to lung infection. While higher microbial diversity is associated with higher lung function, the data on the impact of short-term antibiotics on changes in microbial diversity is conflicting. Further, Prevotella secretes beta-lactamases, which may influence recovery of lung function. We hypothesize that sub-therapeutic and broad spectrum antibiotic exposure leads to decreasing microbial diversity. Our secondary aim was to evaluate the concerted association of beta-lactam pharmacokinetics (PK), antibiotic spectrum, microbial diversity, and antibiotic resistance on lung function recovery using a pathway analysis. This was a retrospective observational study of persons with CF treated with IV antibiotics for PEx between 2016 and 2020 at Children’s National Hospital; respiratory samples and clinical information were collected at hospital admission for PEx (E), end of antibiotic treatment (T), and follow-up (F). Metagenomic sequencing was performed; PathoScope 2.0 and AmrPlusPlus were used for taxonomic assignment of sequences to bacteria and antibiotic resistance genes (ARGs). M/W Pharm was used for PK modeling. Comparison of categorical and continuous variables and pathway analysis were performed in STATA. Twenty-two PwCF experienced 43 PEx. The study cohort had a mean age of 14.6 years. Only 12/43 beta-lactam courses had therapeutic PK, and 18/43 were broad spectrum. A larger decrease in richness between E and T was seen in the therapeutic PK group (sufficient - 20.1 vs. insufficient - 1.59, p = 0.025) and those receiving broad spectrum antibiotics (broad - 14.5 vs. narrow - 2.8, p = 0.030). We did not detect differences in the increase in percent predicted forced expiratory volume in one second (ppFEV1) at end of treatment compared to PEx based on beta-lactam PK (sufficient 13.6% vs. insufficient 15.1%) or antibiotic spectrum (broad 11.5% vs. narrow 16.6%). While both therapeutic beta-lactam PK and broad-spectrum antibiotics decreased richness between PEx and the end of treatment, we did not detect longstanding changes in alpha diversity or an association with superior recovery of lung function compared with subtherapeutic PK and narrow spectrum antimicrobials.© 2023. The Author(s).