Bonjour, Je cherche une solution afin de Copier/Coller Automatiquement, et chaque jour à 3am, le contenu d'un Dossier vers un GoogleDrive
j'ai ce script nommé CopyFiles.ps1, mais je souhaiterais savoir s'il est OK
Code PowerShell : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 param( [string]$SourcePath, [string]$DestinationPath ) Copy-Item Path $SourcePath Destination $DestinationPath -Recurse $Action = New-ScheduledTaskAction -Execute 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -Argument "-NonInteractive -NoLogo -NoProfile -File 'C:\CopyFiles.ps1' SourcePath 'C:\Source DestinationPath '\\SERVER\Destination'" $Trigger = New-ScheduledTaskTrigger -Daily -At '3AM' $Task = New-ScheduledTask -Action $Action -Trigger $Trigger -Settings (New-ScheduledTaskSettingsSet)
Partager