1
votes

I am currently using Powershell to get me the list of all the IP Address of my machine. When I am not using my vpn connection ( when I am at work) I get the IP Address of my machine correct. but When I am at home and I am using my VPN connection, I get another IP Address which is being provided by the client. I would like to get the second IP Address provided to me by the VPN client.

I am currently using this query

(gwmi -query "Select IPAddress From Win32_NetworkAdapterConfiguration = True").IpAddress

However like I have said before this query does not give me the IP address provided by the VPN client .

Please suggest..

Thanks and Regards Nav

1

1 Answers

2
votes

try this:

[System.Net.Dns]::GetHostEntry($a).addresslist

Return al IP4 and IP6. Cisco VPN not always show to client the IP of vpn connection.