In this article, we focus on the problem of mitigating the risk of not being able to meet the power demand, due to the inherent uncertainty of renewable energy generation sources in microgrids. We consider three different demand scenarios, namely meeting short-time horizon power demand, a sustained energy demand and a scenario where the power demand at a prescribed future time has to be met with almost sure guarantee with power generation being stochastic and following dynamics governed by geometric Brownian motion. For each of these scenarios we provide solutions to meet the electrical demand. We present results of numerical experiments to demonstrate the applicability of our schemes.