If I run this script in Powershell ISE it works, but when it is launched from a batch file, it does not work. The script is here(clicky). The batch file that launches this is here(clicky).
When launched from the batch file, powershell writes (0) and it does not work. When launched from ISE, powershell writes (1) and then works.
Also, I did confirm that the script is being run, but not correctly.
Thank you in advance!