Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Script errors out in middle of word

$
0
0

Hello all,

I have a pretty basic script that I am trying to get to run so we can change a rather important directory and have the shortcut be copied to and/or overwritten on their desktop.  Here is the lingo:

New-PSDrive –Name “K” –PSProvider FileSystem –Root “\\ppcs-store\ppcs”

copy-item "K:\Red Folder.lnk" -destination "u:\desktop\Redfolder.lnk"

remove-psdrive -name k

exit

Simple, but it errors out on line 1, character 43, which is the letter e in FileSystem.  No idea why its erroring out, and I was hoping someone may have an answer.  I can run the individual commands locally and they are fine.  Maps, copies, removes, and exits...but the script itself is not working.

As always, any and all help is appriciated!


Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>