To better examine circuit mechanisms underlying perception and behavior, researchers need tools to enable temporally precise control of action-potential generation of individual cells from neuronal ensembles. Here we demonstrate that such precision can be achieved with two-photon (2P) temporally focused computer-generated holography to control neuronal excitability at the supragranular layers of anesthetized and awake visual cortex in both male and female mice. Using 2P-guided whole-cell or cell-attached recordings in positive neurons expressing any of the three opsins ReaChR, CoChR, or ChrimsonR, we investigated the dependence of spiking activity on the opsin's channel kinetics. We found that in all cases the use of brief illumination (≤10 ms) induces spikes of millisecond temporal resolution and submillisecond precision, which were preserved upon repetitive illuminations up to tens of hertz. To reach high temporal precision, we used a large illumination spot covering the entire cell body and an amplified laser at high peak power and low excitation intensity (on average ≤0.2 mW/μm²), thus minimizing the risk for nonlinear photodamage effects. Finally, by combining 2P holographic excitation with electrophysiological recordings and calcium imaging using GCaMP6s, we investigated the factors, including illumination shape and intensity, opsin distribution in the target cell, and cell morphology, which affect the spatial selectivity of single-cell and multicell holographic activation. Parallel optical control of neuronal activity with cellular resolution and millisecond temporal precision should make it easier to investigate neuronal connections and find further links between connectivity, microcircuit dynamics, and brain functions. [ABSTRACT FROM AUTHOR]