docker-machine env can output the environment for cmd or powershell. The output includes comments with the command to set the environment in your shell.
CMD
C:\> docker-machine env --shell cmd manager11
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_CERT_PATH=C:/Users/matt/.docker/machine/machines/manager11
SET DOCKER_MACHINE_NAME=manager11
REM Run this command to configure your shell:
REM @FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd manager11') DO @%i
Powershell
PS C:\> docker-machine env --shell powershell manager11
$Env:DOCKER_TLS_VERIFY = "1"
$Env:DOCKER_HOST = "tcp://192.168.99.100:2376"
$Env:DOCKER_CERT_PATH = "C:/Users/matt/.docker/machine/machines/manager11"
$Env:DOCKER_MACHINE_NAME = "manager11"
# Run this command to configure your shell:
# & docker-machine env --shell powershell manager11 | Invoke-Expression