Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

Schedule a PowerShell

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
ASKER CERTIFIED SOLUTION
Avatar of David Paris Vicente
David Paris Vicente
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK
AXISHK

ASKER

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
Avatar of AXISHK

ASKER

It works fine.