SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Comment déterminer si le compte administrateur a été renommé ?

Accueil > Script > windows_xp > Comment déterminer si le compte administrateur a été renommé ?

Comment déterminer si le compte administrateur a été renommé ?

Par Ismaël LIMBADA, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 03/08/2006 vers 10h.

strComputer = "NOMDELAMACHINE"

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colAccounts = objWMIService.ExecQuery _
    ("Select * From Win32_UserAccount Where Domain = '" & strComputer & "'")

For Each objAccount in colAccounts
    If Left (objAccount.SID, 6) = "S-1-5-" and Right(objAccount.SID, 4) = "-500" Then
        Wscript.Echo objAccount.Name
    End If
Next


Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
3

Visites :
6711

1
2
3
4
5




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft