Link to home
Start Free TrialLog in
Avatar of DrDamnit
DrDamnitFlag for United States of America

asked on

copy-item to User's Desktop?

What's the syntax to copy \\theserver\someshare\thisfile.txt to the current user's desktop?

I am executing the script by first doing this:

set-location \\theserver\someshare\

then running .\thescript.ps1
Avatar of SubSun
SubSun
Flag of India image

Try by setting destination to "$env:USERPROFILE\desktop"
ASKER CERTIFIED SOLUTION
Avatar of becraig
becraig
Flag of United States of America 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