Results are presented from a search for the direct electroweak production of charginos and neutralinos in signatures with either two or more leptons (electrons or muons) of the same electric charge, or with three or more leptons, which can include up to two hadronically decaying tau leptons. The results are based on a sample of proton-proton collision data collected at s=13 TeV, recorded with the CMS detector at the LHC, corresponding to an integrated luminosity of 35.9 fb−1. The observed event yields are consistent with the expectations based on the standard model. The results are interpreted in simplified models of supersymmetry describing various scenarios for the production and decay of charginos and neutralinos. Depending on the model parameters chosen, mass values between 180 GeV and 1150 GeV are excluded at 95% CL. These results significantly extend the parameter space probed for these particles in searches at the LHC. In addition, results are presented in a form suitable for alternative theoretical interpretations.[Figure not available: see fulltext.].