mitchellh/vagrant — pull request #4271 by Scythril (2014-07-30 20:08:32+00:00)
Title: Fixed some WinRM command filters

I was running vagrant in debug on a Windows guest with the chef provisioner and noticed that mkdir and rm were both throwing errors left and right (though they were silently being ignored). My Windows guest was 2012 R2, so it was running PowerShell 4. This version introduced a problem with any commands running
```
mkdir -p
```
because they created a new switch that made -p ambiguous. This switch doesn't mean the same thing in PowerShell as on *nix (On PS <4 it would resolve to -Path, but *nix is recursive, which mkdir in PS is by default). When using PS4+, the command errors out.
The chef provisioner is also running
```
rm -f path
```
a lot, but the previous version of the rm command filter was picking up -f as the path, and always failing as well. I also fixed the recursive check on the rm command filter to include a few extra common combinations of switches to rm (-r, -rf, -fr) when running recursively, and try to more intelligently find the path.