Closed dylanmei closed 9 years ago
The info query is also used prior to copying a file in order to determine how many chunks it can send to the remote before needing to discard the current shell and initiate a new one.
confirmed independently using winrm commandline tool
winrm -hostname 172.16.111.135 -username "vagrant" -password "vagrant" "winrm get winrm/config -format:xml"
<f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="VAGRANT-51A0FAR"><f:Message>Access is denied. </f:Message></f:WSManFault>
Error number: -2147024891 0x80070005
Access is denied.
How about allowing for the value for MaxEnvelopeSizeKB as a config parameter?
I'm not ready to take in arguments like that. The machine itself is the source of truth, and if we can't read it out the I'd like it degrade gracefully.
Commit c29edbd044eea8a33a103bca707f7fe7528bc0fd is a small step in that direction, and will work around the winrmcp copy problem for a standard 2008 R2 installation.
I played around with wsman, and TrustedHosts settings to get powershell to return the values, but none worked.
I have it working in branch winrmcp/elevated_info_query but it's hardcoded to vagrant/vagrant and it's not ready for prime-time without tests and a refactor or three. :see_no_evil:
I've worked around this by 1. allowing max-ops-per-shell
to be provided to the cli/lib and 2. setting the default to 15 to make Windows 2008 R2 happy.
As noted here and here, an administrator cannot access WinRM info on Windows 2008 R2.