PowerShell script runs fine manually, but doesn't run in Task scheduler. The script:
$env:CLIENTNAME | Out-File C:\Users\tst5clj\Desktop\folder\log.txt -Append
I tried another command($env:COMPUTERNAME) and works fine both manually and via PowerShell.