Local check on windows not being picked up

Using a simple bat file was easier than trying to get powershell to produce the right output. After that, the easiest way for me to get it working was to just forget about spending more time on debugging the windows agent issue and try it on a linux server, which worked perfectly the first time.