【发布时间】:2017-08-15 03:05:30
【问题描述】:
我刚开始使用 PowerShell,所以请善待。
我要做的就是使用 PowerShell 和 robocopy 将我的目录和文件从笔记本电脑备份到台式计算机,即“服务器”。我是两台机器的管理员(Windows 7)。
尽管为“所有人”设置了执行所有操作的权限,但在“服务器”(即桌面)上拒绝访问失败。
非常感谢任何帮助(或更好的方法)!谢谢。
$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;
【问题讨论】:
标签: powershell backup robocopy