• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 416
  • Last Modified:

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?
0
Maquinaloca
Asked:
Maquinaloca
3 Solutions
 
Peter HutchisonSenior 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.
1
 
krxxCommented:
There is also a -windowstyle parameter that can be set to "Hidden".



PowerShell.exe -windowstyle hidden { your script.. }
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
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.
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Recommendation:
http:#a39194593  250
http:#a39194649  250
as both together will work best (as I suggested in http:#a39195166 ).
0
 
MaquinalocaAuthor Commented:
Thanks. I accept
0
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.

Join & Write a Comment

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now