Forum Discussion
Scheduled Task
Did you check the WindowsStyle in PowerShell parameter
https://powershell.programmingpedia.net/en/tutorial/5839/powershell-exe-command-line
PowerShell.exe -windowstyle minimized
---------------------------------
If you find this answer helpful, please click on Best Response and give a like 🙂
Thanks
- SchulziOct 02, 2020Brass Contributor
Hi farismalaeb
I already tried putting "-windowstyle minimized/hidden " under $Arguments written like following:
$Argument = "-windowstyle minimized/hidden -file "Z:\Applications\...\"
As I already mentioned the only thign that happend was a shorter Flash of the window
Greetings
Yannik Schulz
- farismalaebOct 02, 2020Iron Contributor
Oh yea, sorry, I was looking through the code.
I agree with you, I even try it with CMD and the same thing happened, I try to use the cmd internal command start /min it successfully executed PowerShell in minimized state, but cmd when it starts, it flashes for 1 sec and then disappears, then Powershell executed in min state.
I also set the scheduled task to be hidden but still the same, 1-sec flashes and then disappear.
if you want it completely invisible, then it seems that you will need to use VBS.