If you want to connect your portainer to a Portainer Server, you will have to adapt your code to windows
Bash
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
--restart always \
-e EDGE=1 \
-e EDGE_ID=YOURID \
-e EDGE_KEY=YOURKEY \
-e EDGE_INSECURE_POLL=1 \
--name portainer_edge_agent \
portainer/agent:latest