We calculate the probability distribution of work for an exactly solvable model of a system interacting with its environment. The system of interest is a harmonic oscillator with a time-dependent control parameter, the environment is modeled by N-independent harmonic oscillators with arbitrary frequencies, and the system-environment coupling is bilinear and not necessarily weak. The initial conditions of the combined system and environment are sampled from a microcanonical distribution and the system is driven out of equilibrium by changing the control parameter according to a prescribed protocol. In the limit of infinitely large environment, i.e., N -> infinity, we recover the nonequilibrium work relation and Crooks s fluctuation relation. Moreover, the microcanonical Crooks relation is verified for finite environments. Finally, we show the equivalence of multitime correlation functions of the system in the infinite environment limit for canonical and microcanonical ensembles.