Solved

Schedule a PowerShell

Posted on 2014-01-10
3
317 Views
Last Modified: 2014-01-10
Want to schedule a powershell on WIndow 2008 but it doesn't work. Any idea ??


Program/Script : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Add arguments (optional) : -noexit C:\Scripts\ChkDisk\ChkDisk.ps1
Start in (optional) : c:\scripts\ChkDisk

The powershell need a file computer.csv stored under c:\scripts\ChkDisk.

Tks
PowerShell.png
0
Comment
Question by:AXISHK
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
David Paris Vicente earned 500 total points
ID: 39772876
You need to put powershell file before the the path location of the file.

Take a look here and see if help Task Scheduling Tutorial

Regards
0
 

Author Comment

by:AXISHK
ID: 39772901
Get-Content : Cannot find path 'C:\computer.csv' because it does not exist.

In fact, the power script and the file is store under c:\scripts\chkdisk\chkdisk.ps1.

How to ensure it look for the file where the script is stored ?

Tks
0
 

Author Closing Comment

by:AXISHK
ID: 39772904
It works fine.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 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