File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ if ($PSCmdlet.ParameterSetName -eq 'new') {
12
12
Write-Host " changed=no comment=`' TAP-Windows adapter $New exists`' "
13
13
exit
14
14
}
15
- if (-Not (Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Like Eth * )) {
15
+ if (-Not (Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Match " ^(Ethernet|Local Area Connection) " )) {
16
16
$p = Start-Process $tapInstallCmd - ArgumentList $tapInstallArgs - NoNewWindow - Wait - PassThru
17
17
}
18
- Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Like Eth * `
18
+ Get-NetAdapter - InterfaceDescription $tapDesc | Where-Object Name -Match " ^(Ethernet|Local Area Connection) " `
19
19
| Select-Object - First 1 | Rename-NetAdapter - NewName $New
20
20
Write-Host " changed=yes comment=`' TAP-Windows adapter $New created`' "
21
21
}
You can’t perform that action at this time.
0 commit comments