Most recent improvements in battery and electric vehicle (EV) technologies, combined with some favorable off-peak charging rates and an enormous PV potential, make California a prime market for electric vehicle as well as stationary storage adoption. However, EVs or plug-in hybrids, which can be seen as a mobile energy storage, connected to different buildings throughout the day, constitute distributed energy resources (DER) markets and can compete with stationary storage, onsite energy production (e.g. fuel cells, PV) at different building sites. Sometimes mobile storage is seen linked to renewable energy generation (e.g. PV) or as resource for the wider macro-grid by providing ancillary services for grid-stabilization. In contrast, this work takes a fundamentally different approach and considers buildings as the main hub for EVs / plug-in hybrids and considers them as additional resources for a building energy management system (EMS) to enable demand response or any other building strategy (e.g. carbon dioxide reduction). To examine the effect of, especially, electric storage technologies on building energy costs and carbon dioxide (CO2) emissions, a distributed-energy resources adoption problem is formulated as a mixed-integer linear program with minimization of annual building energy costs or CO2 emissions. The mixed-integer linear program is applied to a set of 139 different commercial building types in California, and the aggregated economic and environmental benefits are reported. To show the robustness of the results, different scenarios for battery performance parameters are analyzed. The results show that the number of EVs connected to the California commercial buildings depend mostly on the optimization strategy (cost versus CO2) of the building EMS and not on the battery performance parameters. The complexity of the DER interactions at buildings also show that a reduction in stationary battery costs increases the local PV adoption, but can also increase the fossil based onsite electricity generation, making an holistic optimization approach necessary for this kind of analyses.