SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Changer le compte d'execution d'un service

Accueil > Script > maintenance > Changer le compte d'execution d'un service

Changer le compte d'execution d'un service

Par Nicolas MILBRAND, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 07/03/2005 vers 21h.

Description :
Ce script VBS change le compte de service en administrateur pour tous les services s'executant à l'aide du compte utilisateur.

Script :

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServices = objWMIService.ExecQuery _
("Select * from Win32_Service")
For each objService in colServices
If objService.StartName = ".\utilisateur" Then
errServiceChange = objService.Change _
( , , , , , , ".\administrateur" , "password")
End If
Next



Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
3

Visites :
8637

1
2
3
4
5

Script Précédent :

Liste les services arrêtés



Retrouvez ci-dessous les autres sections du Laboratoire Microsoft