Skip to content

SPInstallPrereqs: Improve diagnostics for PrerequisiteInstaller exit code 1000 #1482

Description

@raandree

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions