NEWPowershell script to copy user desktop and document to their hostname folder.

Nitin_ted

Nitin_ted

Well-Known Member
47
1
8
Hello everyone, I'm seeking advice on creating a PowerShell or batch script. The script should copy the "Documents" and "Desktop" files from the latest user folder in the "C:\Users" directory to a destination folder. I have already set up folders using hostnames, so I need the script to match the hostname with the corresponding destination folder and copy the files into it. Any guidance on how to accomplish this would be greatly appreciated.
Garth

Garth

Well-Known Member
Staff member
1,708
140
63