If you set the task to "Run only when the user is logged on", then the script will be launched in the context of the user's desktop session. That allows you to see and interact with the console window.
When you have it set to "Run whether the user is logged on or not." then the launched script does not interact with the desktop. You cannot "see" the window.