With the introduction of Microsoft Server 2019, a change in task scheduler causes a malfunction in task from executing.
Add the below folders listed folders:
**Make sure the task will be created with administrative privileges.
Navigate to the below folders and ensure there is a Desktop folder.
C:\Windows\SysWOW64\config\systemprofile
C:\Windows\System32\config\systemprofile