I tested this on my vm, and it succeeds with ```test -d $Env:SystemRoot```, but fails on ```test -d $SystemRoot```

By default, vagrant-windows uses powershell as its shell.  So, ```test -d $Env:SystemRoot`` will work only from the powershell within Windows.  It's a bit confusing that ```test -d $SystemRoot``` works though, because using the Windows cmd shell, you'd need to reference it like ```test -d %SystemRoot%```

It seems like maybe the guest is using cygwin's shell?  Is it possible your VM is communicating via ssh rather than winrm?

Branching on ```machine.guest.name == :windows``` seems like a good idea, and worked on my test.  It would also handle that case where the windows guest is communicating via ssh.