This problem is fixed for Windows Server 2012 R2 and Windows 8.1 users. For these systems, apply the KB 3133689 hotfix.
Assume that you configure a Windows PowerShell script to run under a specific user account by using Windows Task Scheduler in Windows Server 2012 or Windows 8. For example, you direct the script to <username>. When the script is run, any output that is directed to the %USERPROFILE% path is written to C:\Users\Default\* instead of C:\Users\<username>\*.
This problem occurs because of an architectural change to Task Scheduler in Windows 8. Because of this change, the user profile for the account configuration may not be fully loaded when the script references the %USERPROFILE% path.
To work around this problem, create a dummy process to run under the context of the desired user account one (1) minute before the scheduled script starts. This makes sure that the user profile is fully loaded when the script runs.
Article ID: 2968540 - Last Review: 20 Feb 2016 - Revision: 1
Windows Server 2012 Datacenter, Windows Server 2012 Datacenter, Windows Server 2012 Standard, Windows Server 2012 Standard, Windows 8