The effect of confinement on the conformation of N dumbbells in D dimensions close to a non-interacting and rigid flat wall is examined. Using statistical mechanics and numerical calculations, the partition coefficient and the confinement-induced change in the configurational entropy are calculated as a function of the conformation tensor {varvec{c}} and of the distance of the dumbbells from the wall. Analytical predictions and numerical results for D=1 concerning the behavior close to the limiting cases (onset of and saturation of confinement) agree favorably; in one case where an analytical prediction has not been achieved, a thorough numerical study establishes the limiting behavior nevertheless. Beyond these limiting cases, the overall behavior of the partition coefficient and the configurational entropy has been examined as well in detail, for various choices of the parameters. Furthermore, it is shown that the effect of confinement for D>1 is captured entirely by the partition coefficient determined for D=1. In general, the average extension of the dumbbells in the direction perpendicular to the wall is decreased the closer the dumbbells are to the wall. Also, the decay of the partition coefficient with increasing extension of the dumbbells becomes steeper, i.e., more localized, the higher the number of dumbbells N. Finally, it is discussed under what conditions these results can be used also for the case of slab- (i.e., slit-) confinement.Graphical abstract