Update host_info.ps1

Changed method for getting IP addresses.  Windows built-in VPN IP addresses do not appear in list using Get-WMIObject, causing shared folders to fail.
This commit is contained in:
agreenbhm 2015-02-17 13:04:54 -05:00
parent 92762eeb8c
commit 2557e5f3f8
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
$ErrorAction = "Stop" $ErrorAction = "Stop"
$net = Get-WmiObject -class win32_NetworkAdapterConfiguration -Filter 'ipenabled = "true"' $net = Get-NetIPAddress
$result = @{ $result = @{
ip_addresses = $net.ipaddress ip_addresses = $net.IPAddress
} }
Write-Output $(ConvertTo-Json $result) Write-Output $(ConvertTo-Json $result)