How to use PowerShell and robocopy to backup files to a server? -
i starting powershell, please kind.
all want backup directories , files laptop desktop computer, i.e. "server", using powershell , robocopy. administrator both machines (windows 7).
this fails access denied on "server", i.e., desktop, despite permissions beingness set "everybody" everything.
any help (or improve way) appreciated! thanks.
$cred=get-credential $sourcepath = ("\\localhost\c$\nova5"); $targetpath = ("\\library\e$\nova5"); new-psdrive -name source -psprovider filesystem -root $sourcepath new-psdrive -name target -psprovider filesystem -root $targetpath -credential $cred robocopy source target /e; return;
psdrive feature powershell cmdlet not extrrnal command , alter line:
robocopy "\\localhost\c$\nova5" "$targetpath" /e powershell backup robocopy
No comments:
Post a Comment