Quando eseguo la robocopy a un prompt dei comandi di amministrazione, viene eseguito correttamente.
C: \ Users \ StoreMgr & gt; robocopy Punto di vendita C: \ Users \ Public \ Documents \ Intuit \ QuickBooks 12.0 \ Data \ Paracept "" G: \ My Drive \ Backup "qbpos1.db
ROBOCOPY :: Robusta copia di file per Windows Avviata: venerdì 6 aprile, 2018 3:46:37 PM Fonte: C: \ Users \ Public \ Documents \ Intuit \ QuickBooks Punto vendita 12.0 \ Data \ Paracept \ Dest = G: \ My Drive \ Backup \
File: qbpos1.db Opzioni: / DCOPY: DA / COPY: DAT / R: 1000000 / W: 30
1 C:\Users\Public\Documents\Intuit\QuickBooks Point of Sale
12.0 \ Data \ Paracept \ 100% più recente 215.1 m qbpos1.db
Total Copied Skipped Mismatch FAILED Extras Dirs : 1 0 1 0 0 0
File: 1 1 0 0 0 0 Byte: 215,13 m 215,13 m 0 0 0 0 Times: 0:00:01 0:00:01 0:00:00 0:00:00
Velocità: 164779476 byte / sec. Velocità: 9428,757 MegaByte / min. Conclusa : Venerdì 6 aprile 2018 3:46:38 PM
Quando lo eseguo in PowerShell viene visualizzato un errore:
ROBOCOPY :: Robust File Copy for Windows
Started : Friday, April 6, 2018 4:47:58 PM 2018/04/06 16:47:58 ERROR 5 (0x00000005) Getting File System Type of Destination G:\My Drive\QBBackups\ Access is denied.
Source : C:\Users\Public\Documents\Intuit\QuickBooks Point of Sale 12.0\Data\Paracept\ Dest - G:\My Drive\QBBackups\
Files : qbpos1.db
Options : /V /DCOPY:D /COPY:DT /B /R:1000000 /W:30
2018/04/06 16:47:58 ERROR 5 (0x00000005) Creating Destination Directory G:\My Drive\QBBackups\ Access is denied.
Bat file: powershell.exe -executionpolicy Bypass .\QBScheduledBackup.ps1 -GDrivePath 'G:\My Drive\QBBackups' -Version 12.0 -CompanyName Paracept
robocopy Command: Robocopy $DBSPath $GDrivePath qbpos1.db /COPY:DT /B /V /LOG:"C:\RobocopyLog1.txt"
Ho eseguito senza parametri in PowerShell con gli stessi errori
Powerhell in esecuzione come admin in tutti i casi
Robocopy C: \ Users \ Public \ Documents \ Intuit \ QuickBooks Punto vendita 12.0 \ Data \ Paracept G: \ My Drive \ Paracept qbpos1.db