dsccommunity / dsccommunity/SharePointDsc

SPInstallPrereqs: Improve diagnostics for PrerequisiteInstaller exit code 1000

Open
#1,482 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
246
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Problem description

On an offline SharePoint Server 2019 deployment, SPInstallPrereqs repeatedly
failed with the following generic error:

The prerequisite installer ran with the following unknown exit code 1000

The DSC error does not identify the failed prerequisite or direct the operator
to the native PrerequisiteInstaller log. The native log did contain the
actual cause:

Error: The tool was unable to install Web Server (IIS) Role.

In this case, several removed-payload .NET/WAS/IIS features needed an offline
source. After all required Windows features were installed from the matching
Windows Server source, PrerequisiteInstaller.exe completed its next stage and
returned the documented restart code 3010. SharePointDsc handled 3010
correctly, the node rebooted, and the configuration converged.

This is related to #649, where the same top-level 1000 error was resolved by
providing SXSPath. This report is not asking SharePointDsc to treat 1000 as
success or as a reboot request. Microsoft documents 3010, not 1000, as
"A restart is needed":

Install prerequisites for SharePoint Server from a network share

The request is to make the existing failure actionable by pointing to the
native installer log and, for offline deployments, the SXSPath/Windows
feature source.

Verbose logs

DSC status:
Status=Failure
RebootRequested=False
Resource=[SPInstallPrereqs]InstallPrerequisites

PowerShell DSC resource MSFT_SPInstallPrereqs failed to execute
Set-TargetResource functionality with error message:
The prerequisite installer ran with the following unknown exit code 1000

Native PrerequisiteInstaller log from the same run:
2026-07-23 08:50:46 - Installing windows server roles and features.
$operation = Install-WindowsFeature NET-HTTP-Activation,NET-Non-HTTP-Activ,
NET-WCF-Pipe-Activation45,NET-WCF-HTTP-Activation45,Web-Server,...,
WAS-NET-Environment,... -IncludeManagementTools -verbose
2026-07-23 08:52:28 - Error: The tool was unable to install Web Server (IIS) Role.
2026-07-23 08:52:28 - Last return code (0X3E8=1000)
2026-07-23 08:52:28 - Return code (0X3E8=1000)

Native log after installing all required Windows features from an offline source:
2026-07-23 10:18:05 - All prerequisites have been installed successfully.
2026-07-23 10:18:05 - File Rename operations are pending a reboot.
2026-07-23 10:18:05 - Unattended installation - Not restarting server.
2026-07-23 10:18:05 - Return code (0XBC2=3010)

Final DSC result after the existing 3010 handling rebooted the node:
LCMState=Idle
Status=Success
Test-DscConfiguration=True

DSC configuration

Configuration Repro
{
    param
    (
        [Parameter(Mandatory)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc -ModuleVersion '5.3.0'

    node localhost
    {
        SPInstallPrereqs InstallPrerequisites
        {
            IsSingleInstance       = 'Yes'
            InstallerPath          = '\\fileserver\SharePoint\SP_2019\PrerequisiteInstaller.exe'
            OnlineMode             = $false
            KB3092423              = '\\fileserver\SharePoint\SP_2019\Prerequisites\AppFabric-KB3092423-x64-ENU.exe'
            DotNet472              = '\\fileserver\SharePoint\SP_2019\Prerequisites\NDP472-KB4054530-x86-x64-AllOS-ENU.exe'
            IDFX11                 = '\\fileserver\SharePoint\SP_2019\Prerequisites\MicrosoftIdentityExtensions-64.msi'
            MSIPCClient            = '\\fileserver\SharePoint\SP_2019\Prerequisites\setup_msipc_x64.exe'
            SQLNCli                = '\\fileserver\SharePoint\SP_2019\Prerequisites\sqlncli.msi'
            Sync                   = '\\fileserver\SharePoint\SP_2019\Prerequisites\Synchronization.msi'
            WCFDataServices56      = '\\fileserver\SharePoint\SP_2019\Prerequisites\WcfDataServices.exe'
            MSVCRT11               = '\\fileserver\SharePoint\Prerequisites\vcredist_x64_2012.exe'
            MSVCRT141              = '\\fileserver\SharePoint\Prerequisites\VC_redist.x64.exe'
            PsDscRunAsCredential   = $SetupAccount

            # Omitted in the failing configuration. Supplying the matching
            # Windows Server source, or preinstalling every required feature
            # from it, resolves the underlying Windows feature failure.
            # SXSpath = '\\fileserver\WindowsServer2025\sources\sxs'
        }

        LocalConfigurationManager
        {
            RebootNodeIfNeeded = $true
            ActionAfterReboot  = 'ContinueConfiguration'
        }
    }
}

Suggested solution

Keep exit code 1000 on the failure path. Do not set
$global:DSCMachineStatus for this undocumented code.

Make the failure message actionable, for example:

The prerequisite installer failed with undocumented exit code 1000. Review the
latest PrerequisiteInstaller*.log under the executing account's temporary
directory. For offline installations, verify SXSPath or preinstall all required
Windows features from the matching Windows Server source.

A unit test could verify that exit code 1000 still throws, mentions the native
log, and includes the offline source guidance. It may also be useful to add the
native log location guidance to the SPInstallPrereqs resource documentation.

Related issue:
Error Installing SharePoint 2016 Prerequisites in Offline mode #649

SharePoint version and build

SharePoint Server 2019
Farm build: 16.0.10337.12109

Operating system the target node is running

OsName                : Microsoft Windows Server 2025 Datacenter
OsOperatingSystemSKU  : DatacenterServerEdition
OSArchitecture        : 64-bit
WindowsVersion        : 2009
WindowsBuildLabEx      : 26100.1.amd64fre.ge_release.240331-1435
OsLanguage            : en-US
OsMuiLanguages        : {en-US}

PowerShell version and build the target node is running

PSVersion             : 5.1.26100.32684
PSEdition             : Desktop
CLRVersion            : 4.0.30319.42000
WSManStackVersion     : 3.0

SharePointDsc version

Name    : SharePointDSC
Version : 5.3.0
Path    : C:\Program Files\WindowsPowerShell\Modules\SharePointDSC\5.3.0\SharePointDSC.psd1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SPInstallPrereqs resource and its existing handling for prerequisite installer exit codes. Locate the related unit tests and documentation, then verify that exit code 1000 still fails while the message points to the native PrerequisiteInstaller log and offline SXSPath or Windows feature source guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.