VSCode with activated ssh-agent on Windows 10

I want to use git from within VSCode, using my ssh-key. My current working fix is this:

  1. start Powershell
  2. run start-ssh-agent.cmd (of git installation)
  3. run code

This links the ssh agent or socket to VSCode, effectively allowing me to use the key for git commands.

How do turn this into a proper script? Or even better: How do I start and configure the ssh-agent automatically so it's globally available (similar to ssh-add on linux)?