Herpes virus infections are a major concern after solid organ transplantation and linked to the immune function of the recipient. We aimed to determine the incidence of positive herpes virus (cytomegalovirus (CMV), Epstein-Barr virus (EBV), herpes simplex virus type 1/2 (HSV-1/2), and varicella zoster virus (VZV)) PCR tests during the first year post-transplantation and assess whether a model including immune function pre-transplantation and three months post-transplantation could predict a subsequent positive herpes virus PCR. All participants were preemptively screened for CMV, and EBV IgG-negative participants were screened for EBV during the first year post-transplantation. Herpes virus PCR tests for all included herpes viruses (CMV, EBV, HSV-1/2, and VZV) were retrieved from the Danish Microbiology database containing nationwide PCR results from both hospitals and outpatient clinics. Immune function was assessed by whole blood stimulation with A) LPS, B) R848, C) Poly I:C, and D) a blank control. Cytokine concentrations (TNF-α, IL-1β, IL-6, IL-8, IL-10, IL-12p40, IL-17A, IFN-α, and IFN-γ) were measured using Luminex. We included 123 liver (54%), kidney (26%), and lung (20%) transplant recipients. The cumulative incidence of positive herpes virus PCR tests was 36.6% (95% CI: 28.1-45.1) during the first year post-transplantation. The final prediction model included recipient age, type of transplantation, CMV serostatus, and change in Poly I:C-induced IL-12p40 from pre-transplantation to three months post-transplantation. The prediction model had an AUC of 77% (95% CI: 61-92). Risk scores were extracted from the prediction model, and the participants were divided into three risk groups. Participants with a risk score <5 (28% of the cohort), 5-10 (45% of the cohort), and >10 (27% of the cohort) had a cumulative incidence of having a positive herpes virus PCR test at 5.8%, 25%, and 73%, respectively (p < 0.001). In conclusion, the incidence of positive herpes virus PCR tests was high, and a risk model including immune function allowed the prediction of positive herpes virus PCR and may be used to identify recipients at higher risk.