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.
pull/1215/head
Shawn Neal 11 years ago
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…
Cancel
Save