Bonjour,
J'aimerai exécuter un script powershell depuis un serveurA en remote sur un serveurB via une commande powershell
Ensuite, l'idée est de scheduler cette tache sur le serveurA.
Avez-vous une commande simple et efficace pour cela ?
merci,
Bàv,
Et voici :
Invoke-Command -ComputerName Server01, Server02 -FilePath c:\Scripts\DiskCollect.ps1
Source : https://docs.microsoft.com/fr-fr/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-6
Cordialement,
Sylvain (MCP, MCTS Windows Server 2008 R2 Server Virtualization, MCTS Exchange 2010)
WWW : http://snsv.consulting | Blog : http://sylvaincoudeville.fr