Open XristophD opened 6 years ago
I'm not exactly sure what's going on in your environment, but this doesn't happen (and has never happened) in any of mine. LanguagePackInstalled is actually a registry value that indicates that a langage pack was just installed and therefore requires configuration (PSConfig or PSConfigUI), Once configuration has successfully completed, LanguagePackInstalled should be set back to 0 and therefore the script re-launch should be skipped. Perhaps there's something in your environment that's preventing PSConfig from completing successfully?
Also, are you saying that the script is actually causing your servers to actuall re-boot?
Brian
Hey Brian, I am on a longer trip and are currently not able to test it again. Your answer "works on my machine(s)" is not exactly what I expected.
In my setup, on a Windows 2016 Server with SP2016 and German language pack, runs into a loop of the script. Not the server reboots, but the script reboots. I pasted the script block above, so here it is again (currently line 213 in AutoSPInstallerMain.ps1:
languagePackInstalled = (Get-Item -Path "HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\$env:spVer.0\WSS\").GetValue("LanguagePackInstalled")
...
if (($env:SPver -eq "16") -and ($languagePackInstalled))
{
Write-Host -ForegroundColor Yellow " - We need to re-launch the script to work around a known issue with SP2016 when language packs are installed."
$scriptCommandLine = $($MyInvocation.Line)
If (Confirm-LocalSession)
{
$scriptCommandLine = "$env:dp0\AutoSPInstallerLaunch.bat $inputFile"
Write-Host -ForegroundColor White " - Re-Launching:"
Write-Host -ForegroundColor White " - $scriptCommandLine"
Start-Process -WorkingDirectory $PSHOME -FilePath "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass $scriptCommandLine -RemoteAuthPassword $password" -Verb RunAs
$script:aborted = $true
Start-Sleep 10
exit
}
}
CreateWebApplications $xmlinput
So, for me it looks like it is checking on SP-Version (== 16) and if a Language Pack is installed in the registry (what is true in my case), and then goes into reboot. but with the next run of the script, the same variables are set (since the language pack is still installed!) and therefore, it always restarts at this point (for me!!).
It never reaches "CreateWebApplications".
What the script actually should do is check if the language pack is installed AND the reboot has not happened yet, then go into script-reboot, otherwise continue to CreateWebApplications.
Can you explain what I am not seeing in this Code?
Hi XristophD,
you overlooked the line below the registry "GetValue("LanguagePackInstalled")"-statement:
ConfigureLanguagePacks $xmlinput
This function executes psconfig for embedding the changes of the installation program(s) of the language pack(s). When the configuration wizard has done its work successful, it automatically changes (psconfig) this registry value to '0' - and therefore no loop at all.
Maybe you have overlooked the error messages in the output RTF file?
Greetings, Oliver
I was having the same issue where autospinstaller would loop over and over stating "We need to re-launch the script to work around a known issue with SP2016 when language packs are installed." Running psconfig manually seemed to resolve this issue in my case.
Installing SP 2016 with Language Pack with AutoSPInstaller runs currently into a Reboot-Loop. This is cause by a Script-Block within AutoSPInstallerMain.sp1 that checks for SPVersion and LanguagePacksInstalled:
if (($env:SPver -eq "16") -and ($languagePackInstalled))
Because the Re-Launch is not registered somewhere, the script will Re-Launch at this step over and over again.