dead hunter |
voilà j'ai fait un script en vbs
mais le seul défaut, il a besoin de WMI pour tourner sous NT4
WMI n'etant pas deployé sur tous les postes pouvez-vous m'aider à passer le probleme
voici le script
' ---------------------------------------------------------------
' Script VBS donnant les adresses MAC et IP actives, nom machine, login, date et heure ' Script original de JC BELLAMY © 2002 Modifié par Laurent Desprez ' ------------------------------------------------------------------------------------ Dim ComputerSystem,IPConfigSet, IPConfig, Network,DomainSet,fso,shell,f Set fso =WScript.CreateObject("Scripting.FileSystemObject" ) Set network=Wscript.CreateObject("WScript.Network" ) Set Shell =Wscript.CreateObject("WScript.Shell" ) Set f = fso.OpenTextFile("f:\adm\ip.txt", 8, True) computer=ucase(network.ComputerName) set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & Computer).ExecQuery ("SELECT * FROM Win32_NetworkAdapterConfiguration" ) for each IPConfig in IPConfigSet adrIP=IPConfig.IPAddress adrMAC=IPConfig.MACAddress wscript.echo computer &";"& (adrIP(min)) &";"&adrMAC &";" & ucase(network.userName) & ";" & date & " " & time f.Writeline (computer & ";"& (adrIP(min))&";"&adrMAC &";" & ucase(network.userName) & ";" & date & " " & time) f.Close next Wscript.quit merci |