1
안녕하세요 여러 PC의 userprofile을 백업해야합니다. 로그인 한 사용자를 백업하기 위해 % Userprofile %과 같은 전역 명령을 사용할 수 있습니까? 또한 내 스크립트가 내가 말한 폴더를 제대로 백업하지 않는 이유는 무엇입니까? 출력물은 현재 액세스 할 수 없으며이 폴더를 여는 데 더 많은 권한이 필요하다고합니다.Userprofile Robocopy Backup
는$Destination=Read-Host "Please type the path directory you want to copy the backup files" #destination
$Folder=Read-Host "Please type the root name folder" #name of backup folder
$validation=Test-Path $Destination #validate the destination if it has the privileges
New-PSDrive -Name "Backup" -PSProvider FileSystem -Root $Destination #temporary folder for the backup
if ($validation -eq $True){
Set-Location Backup:
}
else{
Write-Host "Error!Run Script Again"
break
}
robocopy "C:\Users\user\desktop" $Destination\$Folder *.* /mir /sec
robocopy "C:\Users\user\pictures" $Destination\$Folder *.* /mir /sec
robocopy "C:\Users\user\documents" $Destination\$Folder *.* /mir /sec
Function Pause{
Write-Host "Backup Sucessfull!!! `n"
}
Pause
덕분에 나는 일을 생각하지만 출력 – Valentino
보면 내가 지금 직면하고있어 문제는 다음과 같습니다이다 : – Valentino
http://imgur.com/a/5AZNa 난 당신이 날 도울 수 있기를 바랍니다 – Valentino