Voici un exemple rapide de création d'une tâche planifiée pour exécuter un script .ps1 en échange de powershell, ce n'est pas aussi simple qu'on pourrait le penser…
Les paramètres à passer sont:
Programme ou script: C: Windows System32 WindowsPowerShell v1.0powershell.exe
Arguments: -NonInteractive -WindowStyle Hidden -command “. «C: Program Files Microsoft Exchange Server V15 bin RemoteExchange.ps1 »; Connect-ExchangeServer -auto; c: ScriptsExchange nom_ script.ps1”
Se avete un metodo più semplice postatelo nei commenti, Merci!!
This is german, but it’s easily translatable:
https://blog.orbit.de/2017/09/12/powershell-skripte-mit-unc-pfaden-in-der-aufgabenplanung/
Here you will see *four* different ways to schedule a task with local paths without parameters, with parameters and the same with UNC paths. Might be helpful!
Thanks for the info Tobias! 🙂