From 2557e5f3f8b4a132ea139c6edbc096bcf37185c6 Mon Sep 17 00:00:00 2001 From: agreenbhm Date: Tue, 17 Feb 2015 13:04:54 -0500 Subject: [PATCH] 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)