This paper describes the economically optimal adoption and operation of distributed energy resources (DER) by a hypothetical California microgrid (μGrid) consisting of a group of commercial buildings over an historic test year, 1999. The optimisation is conducted using a customer adoption model (DER-CAM) developed at Berkeley Lab and implemented in the General Algebraic Modeling System (GAMS). A μGrid is a semiautonomous grouping of electricity and heat loads interconnected to the existing utility grid (macrogrid) but able to island from it. The μGrid minimises the cost of meeting its energy requirements (consisting of both electricity and heat loads) by optimising the installation and operation of DER technologies while purchasing residual energy from the local combined natural gas and electricity utility. The available DER technologies are small-scale generators (< 500 kW), such as reciprocating engines, microturbines, and fuel cells, with or without CHP equipment, such as water- and space- heating and/or absorption cooling. By introducing a tax on carbon emissions, it is shown that if the μGrid is allowed to install CHP-enabled DER technologies, its carbon emissions are mitigated more than without CHP, demonstrating the potential benefits of smallscale CHP technology for climate change mitigation. Reciprocating engines with heat recovery and/or absorption cooling tend to be attractive technologies for the mild southern California climate, but the carbon mitigation tends to be modest compared to purchasing utility electricity because of the predominance of relatively clean generation in California.