troubleshooting Question

Powershell Tasks Executes and Nothing Happens

Avatar of stressedout2004
stressedout2004 asked on
13 Comments1 Solution263 ViewsLast Modified:
When I manually run the following code in power-shell ISE, this code  works fine.
Remove-PSDrive -Name Z
New-PSDrive –Name “Z” –PSProvider FileSystem –Root “\\\csv” –Persist
get-childitem -path E:\CSV *.csv -recurse | move-item -destination Z:

I now add this code to a PS1 file  and create as a scheduled task referencing the powershell file (movefile.ps1).    The scheduled task completes successfully and no errors.    The CSV file is not moved from E to Z
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros