Sign in to follow this  
Followers 0
VAADAdmin

Issue with IPAddress

1 post in this topic

I could use some help. I am trying to retrieve IP addresses from server/workstations which I had working fine. I even found the code below in the forum which works. The issue is the ??????????????? you will see returned for IP addresses as the second listing ( in quote tags). The vbscript version works fine that I could tell.

For $objAdapter in $colAdapters
   ConsoleWrite ("Network Adapter " & $n & @CR)
   ConsoleWrite ("================="& @CR)
   ConsoleWrite ("  Description: " & $objAdapter.Description& @CR)
 
   ConsoleWrite ("  Physical (MAC) address: " & $objAdapter.MACAddress& @CR)
   ConsoleWrite ("  Host name:            " & $objAdapter.DNSHostName& @CR)
 
   If Not ($objAdapter.IPAddress) = " " Then
      For $i = 0 To UBound($objAdapter.IPAddress)
         ConsoleWrite ("  IP address:            " & $objAdapter.IPAddress($i)& @CR)
      Next
   EndIf
 
   If Not ($objAdapter.IPSubnet) = " " Then
      For $i = 0 To UBound($objAdapter.IPSubnet)
         ConsoleWrite ("  Subnet:                " & $objAdapter.IPSubnet($i)& @CR)
      Next
   EndIf
 
   If Not ($objAdapter.DefaultIPGateway) = " " Then
      For $i = 0 To UBound($objAdapter.DefaultIPGateway)
         ConsoleWrite ("  Default gateway:      " & _
             $objAdapter.DefaultIPGateway($i)& @CR)
      Next
   EndIf

Network Adapter 1

=================

Description: Broadcom NetXtreme Gigabit Ethernet - Deterministic Network Enhancer Miniport

Physical (MAC) address: 00:15:58:27:71:B2

Host name: PSCOML3LMBF8

IP address: 10.128.20.29

IP address: ????(???????????????????????????????????E?+??????G????

Subnet: 255.255.255.0

Subnet: ????(???????????????????????????????????E?+??????G????

Default gateway: 10.128.20.254

Default gateway: ????(???????????????????????????????????E?+??????G????

DNS

---

DNS servers in search order:

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0