Redémarrer un ordinateur


Cet exemple de script avec son code permet d'arrêter (éteindre), redémarrer un ordinateur avec la commande shutdown.


Code du script VBS


' ***************************************************************************************
' Redémarrage de l'ordinateur après le compte à rebours
' ***************************************************************************************
Dim sha
Dim objWSHhell
Set sha = WScript.CreateObject("WScript.Shell")
sha.Popup "Redemarrage de l ordinateur",5
set objWSHShell = WScript.CreateObject("WScript.Shell")
objWSHShell.Run "shutdown.exe /r /m \\" & strcomputer

' ***************************************************************************************






Lire la suite »






0462240