User Tools

Site Tools


vbs:bulkshortcutrebuild

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vbs:bulkshortcutrebuild [2014/04/29 12:59] – created gfsadministratorvbs:bulkshortcutrebuild [2014/04/29 17:16] (current) – removed gfsadministrator
Line 1: Line 1:
-====== Localhost Info ====== 
-Ottiene le informazioni sulla scheda di rete ed eventuale adapter VPN restituendo i due IP interni e il nome macchina. Lo script originale è disponibile all'indirizzo [[http://community.spiceworks.com/topic/post/1612511|community.spiceworks.com/topic/post/1612511]] 
  
-<file vb localhostinfo.vbs> 
-dim NIC1, Nic, StrIP, CompName 
-Set NIC1 = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration") 
-For Each Nic in NIC1 
-if Nic.IPEnabled then 
-StrIP = Nic.IPAddress(i) 
-CompName = WshNetwork.Computername 
-Dim WMI, Configs, Config, Adapters, Adapter 
-Set WMI = GetObject("winmgmts:{impersonationlevel=impersonate}root/cimv2") 
-Set Configs = WMI.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled=True") 
-For Each Config In Configs 
-Set Adapters = WMI.AssociatorsOf("Win32_NetworkAdapterConfiguration.Index=" & Config.Index, "Win32_NetworkAdapterSetting") 
-For Each Adapter In Adapters 
-VPNIP = Config.IPAddress(0) 
-Next 
-Next 
-MsgBox "IP Address: "&StrIP & vbNewLine _ 
-& "VPN IP Address: "&VPNIP & vbNewLine _ 
-& "Computer Name: "&CompName ,4160,"IP Address and Computer Name" 
-wscript.quit 
-end if 
- 
-next 
-</file> 
vbs/bulkshortcutrebuild.1398769161.txt.gz · Last modified: 2014/04/29 12:59 by gfsadministrator