Powershell execution

I have a powershell script that generates daily and monthly reports for an application. I'm finding that I need to keep the powershell window opened in order to run the application. This creates a problem as I have to reboot the server often.

Is there a way I can run the script silently?
Who is Participating?
Peter HutchisonConnect With a Mentor Senior Network Systems SpecialistCommented:
You can set up a Scheduled task using the followning command line:
powershell.exe -command "Myscript.ps1"

I also find that enabling use high priviledges in the task. for some admin rights.
krxxConnect With a Mentor Commented:
There is also a -windowstyle parameter that can be set to "Hidden".

PowerShell.exe -windowstyle hidden { your script.. }
QlemoConnect With a Mentor Batchelor and DeveloperCommented:
Guess the -WindowsStyle in combination with a scheduled task is your best choice. That way, your PowerShell task will only run whenever you need it.
QlemoBatchelor and DeveloperCommented:
http:#a39194593  250
http:#a39194649  250
as both together will work best (as I suggested in http:#a39195166 ).
MaquinalocaAuthor Commented:
Thanks. I accept
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.