catch the exception raised in Remove-HnsPolicyList

This commit is contained in:
Yu Liao 2019-11-27 15:43:39 -08:00
parent 45f6270283
commit bbc49d6b1f

View File

@ -780,7 +780,9 @@ function Configure-HostNetworkingService {
netsh interface ipv4 set interface "${vnic_name}" forwarding=enabled
}
Get-HNSPolicyList | Remove-HnsPolicyList
Try {
Get-HNSPolicyList | Remove-HnsPolicyList
} Catch { }
# Add a route from the management NIC to the pod CIDR.
#