In the spectral analysis of time series, the necessity of a robust determination of the background power spectrum and identification of discrete power enhancements, due to the occurrence of periodic fluctuations, encompasses many research fields. Some application in geophysical and astrophysical observations are the identification of periodic density structures in the solar wind, the distinction between discrete and broadband Ultra Low frequency waves in Earth’s magnetospheric field, and the turbulent evolution of the solar wind. Here, we present a new method based on the adaptively weighted multitaper estimate of the power spectral density. Given the direct spectrum (raw) and its four different smoothed versions (med, mlog, bin, but) we obtain, via a maximum likelihood approach, robust background spectrum estimates according to four models (WHT, PL, AR(1), BPL). We select the best representation through statistical criteria and define the confidence levels of possible power spectrum enhancements. We identify periodicities in the time series by combining the discrete power enhancements identified in the spectrum with those identified in the multitaper harmonic F test. We demonstrate the algorithm on a case study of magnetospheric field fluctuations directly driven by periodic structures in the solar wind proton density. The method is robust and flexible, allowing for the characterization of the background spectrum in three distinct environments: the solar wind, magnetosphere, and ground observatories. Using our algorithm to identify background spectra and identify discrete periodicities, we show that there is a directly driven periodicity at f≈0.9 mHz and possibly at f≈0.2 and ≈0.4 mHz.