Bonjour
je souhaite faire parvenir un vbs qui permet de connaitre la liste des adresses ip
connecte sur une ferme de serveur ceci peut etre utile à d autres
grenierDim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set objEnv = WshShell.Environment("Process")
Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")
Set objFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")
Dim LogFile, MyFile
LogFile = "S:TEMPIPClients.csv"
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.OpenTextFile(LogFile, 8 , True)
MyFile.WriteLine "Utilisateur" & ";" & "IP Client" & ";" & "Nom Client" & ";" &
"Serveur Citrix"
objFarm.Initialize(1)
For Each objSession In objFarm.Sessions
MyFile.WriteLine objSession.UserName & ";" & objSession.ClientAddress & ";" &
objSession.ClientName & ";" & objSession.ServerName
'WScript.Echo "User name : " & objSession.UserName
'WScript.Echo "IP Address: " & objSession.ClientAddress
Next
MyFile.close