Hi,
Ive got a problem converting old batch script to powershell.
What i want to do is to copy from PC1,2,3,4.... to SERVER1 a file from every computer from currently logged userprofile.
ex. \\PC1\c$\$env:USERPROFILE\appdata\file\file.1 copy to \\SERVER1\username\file\file.1
This is the old batch, it was designed to startup with system
@echo off
SET backpath=\\server\backup
SET backfolder=%backpath%\%username%_%computername%
MD %backfolder%
@echo on
copy /y "%appdata%\file\file.1l" "%backfolder%\file.1"
@echo off