I have to start a .ps1 when a specific ID come. So I used the Task Scheduler and my script starts correctly!
I'm starting powershell.exe
with the arguments -File C:\Users\ostefanini\Documents\powersh\backup_started.ps1 -WindowStyle Maximized
.
But… the PowerShell window does not appear. I tried to reveal it with "YAPM" (and old task manager on windows, with the ability of reveal window's task) but the program cannot perform this operation.
So, how to see my PowerShell window? (I finished my script with cmdlet pause
).
And the second question, in direct relation with the first one, because my script finish by a "pause" it's never ended. If my task starts again, my script didn't run because of double instance.