Solved

Powershell execution

Posted on 2013-05-24
8
403 Views
Last Modified: 2015-04-21
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
Comment
Question by:Maquinaloca
8 Comments
 
LVL 18

Accepted Solution

by:
Peter Hutchison earned 168 total points
ID: 39194593
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
 

Assisted Solution

by:krxx
krxx earned 166 total points
ID: 39194649
There is also a -windowstyle parameter that can be set to "Hidden".



PowerShell.exe -windowstyle hidden { your script.. }
0
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 166 total points
ID: 39195166
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
 
LVL 68

Expert Comment

by:Qlemo
ID: 39462174
Recommendation:
http:#a39194593  250
http:#a39194649  250
as both together will work best (as I suggested in http:#a39195166 ).
0
 

Author Comment

by:Maquinaloca
ID: 40737238
Thanks. I accept
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
The goal of this Micro Tutorial is to help navigate beginning users with the app store on Windows 8. It will explain exciting features how to maximize your PC through these apps. This will be demonstrated using Windows 8 operating system.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now