vagrant/plugins/synced_folders/smb/scripts/host_info.ps1

12 lines
260 B
PowerShell

$ErrorAction = "Stop"
$net = Get-NetIPAddress | Where-Object {
($_.IPAddress -ne "127.0.0.1") -and ($_.IPAddress -ne "::1")
} | Sort-Object $_.AddressFamily
$result = @{
ip_addresses = $net.IPAddress
}
Write-Output $(ConvertTo-Json $result)