mirror of
https://github.com/hashicorp/packer.git
synced 2026-10-11 08:51:40 -04:00
@@ -38,7 +38,7 @@ if ($HostVMAdapter){
|
||||
if ($HostNetAdapter){
|
||||
$HostNetAdapterIfIndex = @()
|
||||
$HostNetAdapterIfIndex += $HostNetAdapter.ifIndex
|
||||
$HostNetAdapterConfiguration = @(get-wmiobject win32_networkadapterconfiguration -filter "IPEnabled = 'TRUE'") | Where-Object { $HostNetAdapterIfIndex.Contains($_.InterfaceIndex)
|
||||
$HostNetAdapterConfiguration = @(get-wmiobject win32_networkadapterconfiguration -filter "IPEnabled = 'TRUE'") | Where-Object { $HostNetAdapterIfIndex.Contains($_.InterfaceIndex)}
|
||||
if ($HostNetAdapterConfiguration){
|
||||
return @($HostNetAdapterConfiguration.IpAddress)[$addressIndex]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user