Yes, you can hide the PowerShell window by changing the task settings in Task Scheduler.
When editing the task, go to the “General” tab and set the “Configure for” option to match your OS.
Then in the “Actions” tab, instead of using powershell.exe, use this command:
powershell.exe -WindowStyle Hidden -File "C:\Path\To\YourScript.ps1"
This will run the script silently without showing the window.
Also, make sure the task is set to “Run whether user is logged on or not” and that “Do not store password” is unchecked if needed.