?
Solved

Schedule a PowerShell

Posted on 2014-01-10
3
Medium Priority
?
337 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 2000 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

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

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

What is Archiving? Archiving in Exchange Online (called In-Place Archiving) provides users with additional mailbox storage space.
How to Import Outlook PST file to Exchange Server Mailbox without Powershell and Exchange Admin Center. Use SysTools Exchange Import Tool to Move PST file in Exchange 2016 / 13 / 10/ 07 Server Mailbox including Contacts, Calendar, Task and journal d…
Loops Section Overview
Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…

568 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