From 2557e5f3f8b4a132ea139c6edbc096bcf37185c6 Mon Sep 17 00:00:00 2001 From: agreenbhm Date: Tue, 17 Feb 2015 13:04:54 -0500 Subject: [PATCH 1/2] 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. --- plugins/synced_folders/smb/scripts/host_info.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/synced_folders/smb/scripts/host_info.ps1 b/plugins/synced_folders/smb/scripts/host_info.ps1 index 7d283a7f4..a1edbb5e9 100644 --- a/plugins/synced_folders/smb/scripts/host_info.ps1 +++ b/plugins/synced_folders/smb/scripts/host_info.ps1 @@ -1,8 +1,8 @@ $ErrorAction = "Stop" -$net = Get-WmiObject -class win32_NetworkAdapterConfiguration -Filter 'ipenabled = "true"' +$net = Get-NetIPAddress $result = @{ - ip_addresses = $net.ipaddress + ip_addresses = $net.IPAddress } Write-Output $(ConvertTo-Json $result) From a1f6bfb1f217a91f1a69d0715df38534b7adb36a Mon Sep 17 00:00:00 2001 From: agreenbhm Date: Wed, 18 Feb 2015 11:53:03 -0500 Subject: [PATCH 2/2] Update host_info.ps1 --- plugins/synced_folders/smb/scripts/host_info.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/synced_folders/smb/scripts/host_info.ps1 b/plugins/synced_folders/smb/scripts/host_info.ps1 index a1edbb5e9..801563f36 100644 --- a/plugins/synced_folders/smb/scripts/host_info.ps1 +++ b/plugins/synced_folders/smb/scripts/host_info.ps1 @@ -1,6 +1,6 @@ $ErrorAction = "Stop" -$net = Get-NetIPAddress +$net = Get-NetIPAddress | Where-Object {($_.IPAddress -ne "127.0.0.1") -and ($_.IPAddress -ne "::1")} $result = @{ ip_addresses = $net.IPAddress }