Windows Powershell commands need to specify shell
The WinRM communicator defaults to the regular Windows cmd shell so we need to tell Packer to use Powershell when running these guest commands.
This commit is contained in:
parent
67f6d6cdb5
commit
affebcda86
|
@ -23,8 +23,8 @@ var guestOSTypeCommands = map[string]guestOSTypeCommand{
|
|||
},
|
||||
WindowsOSType: guestOSTypeCommand{
|
||||
chmod: "echo 'skipping chmod %s %s'", // no-op
|
||||
mkdir: "New-Item -ItemType directory -Force -ErrorAction SilentlyContinue -Path %s",
|
||||
removeDir: "rm %s -recurse -force",
|
||||
mkdir: "powershell.exe -Command \"New-Item -ItemType directory -Force -ErrorAction SilentlyContinue -Path %s\"",
|
||||
removeDir: "powershell.exe -Command \"rm %s -recurse -force\"",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue