When I switched to a dedicated installer account (one that is a DA), now I get this continuous loop trying to create the UPS and waiting for it.
Comments: ** Comment from web user: DDaigle **
Patch 16156 has the fix for the issue. But let me break this down to make it easier.
1. I am using the SCVMM Template released a couple years ago that uses AutoSPInstaller as part of the process to deliver a complete SharePoint farm in one process.
2. I have modified the template because I do not need it create a SQL tier for me and have added a dedicated Query/Index/Distributed Cache tier to separate some services out.
Using the template and it's documentation, I was able to get to a point where I could deploy the service to my Hyper-V cluster. I used mtail to follow the stdoutput.txt file as the script ran.
The problem I have seems to be similar to what he had with a remote install. The primary difference is that I am running the same script but that it is headless. This causes a problem with spawning a second process to create the UPS. It seems that this is the same problem he had but from remote.
I have used his custom file and it worked perfectly after that. My real request is that you incorporate the installer change such that you have either logic to detect remote/headless (too much work) or add a second argument "-headless" to accomplish the same thing. It may be that you want to assume this with remote but then maybe you do not.
The service template runs the following ahead of the script to ensure it works headless.
```
:: Force PowerShell execution policy to RemoteSigned
REG ADD HKLM\Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell /v ExecutionPolicy /t REG_SZ /d "RemoteSigned" /f
:: Disable UAC prompt for Admins
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\policies\system /v EnableLUA /t REG_DWORD /d 0 /f
```
and runs the script headless by the following.
```
cmd /c %SYSTEMROOT%\system32\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -noprofile -file "\\Server\apps$\AutoSPInstaller-3Tier-Enterprise\SP\autospinstaller\AutoSPInstallerMain.ps1" "\\server\apps$\AutoSPInstaller-3Tier-Enterprise\SP\AutoSPInstaller\AutoSPInstallerInput.xml" -unattended
```
This has been very smooth since the change. While writing this post, I have already used the SCVM Scale-out command to add additional servers (already defined in the xml) to the service farm.
First of all, thanks, but I am curious if you see this being useful.
Daren