I have a powershell program that I add to a task in Task Scheduler.
I set the "Start in (optional)" path to D:\XXX\YYY but when I run the task I see that the current path (retrieved with Get-Location
) is C:\Windows\system32
and not the path that I defined in the start in option.
Any suggestions? The Windows version is Windows Server 2008 R2.
Thanks!