So, I am working on a cook cookbook for Windows, which means that it usually runs on an instance of Windows Server (in this case 2012r2). In particular, I install MSYS2, which uses Cygwin under the hood. I noticed that installing the package was very slow and traced an article showing how, by default, nsswitch.conf in Cygwin uses the slower SAM / AD dynamic integration. For most users, and especially for my test environment, this is not required, so I tried to follow these steps to use only file-based users / groups. This led to significant acceleration (about 6 times).
But there is a strange thing. It works only if I went to the server at least once through RDP. Otherwise, back to slows-ville.
Since this is not very useful for automated testing, I tried to find out what exactly is causing the problem. The most likely candidate is that the first RDP connection (that is, without a WinRM / eyeless session) fills in some part of the user profile, that the headless sessions do not load, but I cannot understand that. I tried calling LoadUserProfile , which should create a profile that it does not exist, but that is not enough.
Any ideas on which part of this I am missing?
windows winapi msys2 cygwin winrm
coderanger
source share