On a Windows 2012 R2 server we have serveral Windows services that need to access a RestFull Interface on a remote server. The RestFull interface on the remote server does not allow anonymous access, so a possible solution to this is to add remote server credentials to the Credentials Manager for the user account running the Windows Service. This is currently done with the
cmdkey.exe /add:10.0.0.1 /user:RemoteUser /pass:RemotePass
These Windows services are running under the Local System account. So we need to run cmdkey.exe under the System account to add the credentials to the System account. This is done with PSExec.exe -s cmdkey.exe command line tool from SysInternals.
The solution works on Windows 7. But I can not make it work on Windows 2012 R2 server. On 2012 only Username is stored correctly. Password is however incorrectly stored or not stored at all. RestFull interface when called reports a Unauthorized (401) HTTP response, so password is somehow corrupt.
Is there a way to make the System account store the Credentials correctly, or should we try and come up with another solution.