I want to deploy an image using WDS on Server 2012. I will be using an answer file for unattended installation with little touch as possible. My answer file works great but I can't get the auto-logon to work and the FirstLogonCommand to run. I added Components\7 oobeSystem\amd64_ Microsoft-Windows- Shell-Setup _neutral\FirstLogonCommands to my answer file using Windows Image Manager and added these values:

CommandLine = powershell -command Install-WindowsFeature DNS –IncludeManagementTools -IncludeAllSubFeature -Restart
Description =Install dns server
Order = 1

Then I did auto logon located at Components\7 oobeSystem\amd64_ Microsoft-Windows- Shell-Setup _neutral\Autologon and added these values:

Domain = contoso
Enabled = true
LogonCount = 1
Typed the password
Username = Administrator

These two components alone don't work. It installs Server 2012 OK and bypasses all the screens I want to bypass, and it even joins the domain contoso successfully.

I have to manually logon and then when I logon no scripts or anything is run. When server manager opens DNS role is not installed and not even located under tools.

Things I tried:

Open cmd as admin and typed: powershell -command Install-WindowsFeature DNS –IncludeManagementTools -IncludeAllSubFeature -Restart this worked and installed roles successfully

If I missed anything to help you troubleshoot just ask.

migrated from superuser.com Feb 17 '15 at 14:41

This question came from our site for computer enthusiasts and power users.

  • When I make scheduled tasks with powershelll I use "powershell.exe -noninteractive <rest of args>" Your case is slightly similar, maybe the same would help. – Clayton Feb 17 '15 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy