From: Madiya on 24 Sep 2009 03:14 I need to get IP address and Host name from the domain. Is it possible with scripts? Pl help. Regards, Madiya
From: VbsEdit on 28 Sep 2009 07:28 You can use this script to list IP Addresses for a Computer strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set IPConfigSet = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE") For Each IPConfig in IPConfigSet If Not IsNull(IPConfig.IPAddress) Then For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress) WScript.Echo IPConfig.IPAddress(i) Next End If Next Looking for a good VBScript editor? Try VbsEdit
|
Pages: 1 Prev: http authentication Next: Wrong encoding while using WinHttpRequest object ? |