From 5bc065d6eb72a0fccaf04e162ff3e723b7dc5b09 Mon Sep 17 00:00:00 2001 From: Gerard Braad <me@gbraad.nl> Date: Tue, 12 Jun 2018 09:37:14 +0000 Subject: [PATCH] Allow localized names for Virtual Switch Signed-off-by: Gerard Braad <me@gbraad.nl> --- drivers/hyperv/hyperv.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hyperv/hyperv.go b/drivers/hyperv/hyperv.go index 6740f295..a980cf11 100644 --- a/drivers/hyperv/hyperv.go +++ b/drivers/hyperv/hyperv.go @@ -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 } -- GitLab