Allow localized names for Virtual Switch

Signed-off-by: Gerard Braad's avatarGerard Braad <[email protected]>
parent eae38c19
......@@ -273,7 +273,7 @@ func (d *Driver) Create() error {
func (d *Driver) chooseVirtualSwitch() (string, error) {
if d.VSwitch == "" {
// Default to the first external switche and in the process avoid DockerNAT
stdout, err := cmdOut("(Hyper-V\\Get-VMSwitch -SwitchType External).Name")
stdout, err := cmdOut("[Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\\Get-VMSwitch -SwitchType External).Name")
if err != nil {
return "", err
}
......@@ -287,7 +287,7 @@ func (d *Driver) chooseVirtualSwitch() (string, error) {
return switches[0], nil
}
stdout, err := cmdOut("(Hyper-V\\Get-VMSwitch).Name")
stdout, err := cmdOut("[Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\\Get-VMSwitch).Name")
if err != nil {
return "", err
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment