For those like me who got here from Google: pscp now has a -hostkey option which can be used like this:
pscp -P 22 -hostkey "ssh-ed25519 255 aa:bb:cc..." ...
This eliminates the need for an interactive PuTTY session to store the host key. Here's what the documentation has to say:
Specify an acceptable host public key. This option may ...
xp_cmdshell is not PowerShell.
If you run: xp_cmdshell 'whoami.exe'; you will discover that you are nt service\mssqlserver and not Administrator.
xp_cmdshell is impersonating that user (which is a service in our case).
So the solution of the problem should be to impersonate an Administrator.
But you cannot do that.
I have tried using Proxy Credentials: