I followed the instructions on this blog post to get a Vagrant box with Windows Server 2012 R2 eval. Then I tried to install Active Directory Domain Controller and an Active Directory Forest (with first domain) using Vagrant provisioning feature. PowerShell scripts are from the same blog, see here. However, after the installation of the AD forest - which needs a reboot -, Vagrant is losing WinRM connection with the following error and doesn't continue with provisioning:
Error occurred: An authorization error occurred while connecting to WinRM.
User: vagrant
Endpoint: http://127.0.0.1:5985/wsman
Message: WinRM::WinRMAuthorizationError
It seems that the AD forest installation breaks network/authentication until Windows is rebooted. The actual installation seems to be successful. But the problem is that the provisioning was not done completely (I have a script that would add a new AD user after forest is installed).
Any ideas how to fix that?
Maybe as a work-around: Is it possible to setup a script that runs AD forest installation on Windows startup such that no reboot is required?