开发者

is there a way I can get the IP Address when I connect to a VPN server

开发者 https://www.devze.com 2023-04-06 03:14 出处:网络
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 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 an开发者_StackOverflow中文版other 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消