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 “\\18.104.22.168\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