Partition function & Boltzman, Maxwell distri

What is the relation between the partition function and the Boltzman, Maxwell distribution?

Differences and similarities?

Both have exponentials to the power of the negative total energy of the microstate. Although the word microstate dosen't occur in the Boltzman, Maxwell case.

Is the BM distribution about velocity and position of particles only whereas the partition function is about any distribution involving macro variables? So it cannot calculate the speeds and position of particles in the system but can tell you about energy, pressure, temperture etc.