2014-02-26 23:54:53 +00:00
|
|
|
$ErrorAction = "Stop"
|
|
|
|
|
2015-06-05 13:19:58 +00:00
|
|
|
$net = Get-NetIPAddress | Where-Object {
|
|
|
|
($_.IPAddress -ne "127.0.0.1") -and ($_.IPAddress -ne "::1")
|
|
|
|
} | Sort-Object $_.AddressFamily
|
|
|
|
|
2014-02-26 23:54:53 +00:00
|
|
|
$result = @{
|
2015-02-17 18:04:54 +00:00
|
|
|
ip_addresses = $net.IPAddress
|
2014-02-26 23:54:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Write-Output $(ConvertTo-Json $result)
|