When I run a scheduled task that calls Powershell.exe (or even run powershell from the Run line), even if I use -WindowStyle hidden or minimized, there is always a blue powershell window that pops up in normal size. It goes away as the window gets minimized or hidden, but sometimes the computer is busy and it stays there for 20 seconds or something.
Does anyone know of a way that I can run a scheduled task that calls powershell, in the context of the current user (because I need to write to the HKey_Current_User registry area), but not have any window appear?
for Windows 10, Windows Server 2019