Solved

Powershell execution

Posted on 2013-05-24
8
408 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 19

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 70

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 70

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

Office 365 Training for IT Pros

Learn how to provision Office 365 tenants, synchronize your on-premise Active Directory, and implement Single Sign-On.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conneā€¦
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.

734 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