Solved

Schedule a PowerShell

Posted on 2014-01-10
3
321 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell  and PSExec = Password failure 5 22
Powershell command 2 24
Powershell send smtp emaiil to server with CNAME alias 2 16
Yes, Powershell again 5 12
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A brief introduction to what I consider to be the best editor for PowerShell.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 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