WSUS install offline with PS

Sokoban 991 Reputation points


I trying to install WSUS with Powershell , It seems I have problem with source

I typing,
Install-WindowsFeature -Name UpdateServices -IncludeManagementTools -Source D:\Source

Install-WindowsFeature : The request to add or remove features on the specified server failed.  
Installation of one or more roles, role services, or features failed.  
The source files could not be found.  
Use the "Source" option to specify the location of the files that are required to restore the feature. For more informa  
tion on specifying a source location, see Error: 0x800f081f  
At line:1 char:1  
+ Install-WindowsFeature -Name UpdateServices -IncludeManagementTools - ...  
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],  
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind  

My folders D:\Source contains , all files about SXS , I have mount a Windows Server 2019 and copies alla files from the Windows catalog SXS.

Please help :-)

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,263 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,403 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 41,136 Reputation points Microsoft Vendor

    Hi, @Sokoban

    Thank you for posting in Microsoft Q&A forum.

    You may try this command to see if it helps:

    Install-WindowsFeature -Name UpdateServices, UpdateServices-WidDB, UpdateServices-Services, UpdateServices-RSAT, UpdateServices-API, UpdateServices-UI  

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

3 additional answers

Sort by: Most helpful
  1. Adam J. Marshall 8,886 Reputation points MVP

    You need to specify the actual sxs folder.
    -Source 'D:\Source\sxs'

  2. Limitless Technology 43,996 Reputation points

    Hello there,

    It seems this is related to folder permission, try to set permission for the folder WSUS, WSUS\WsusContent, %ProgramFiles%\Update Services\LogFiles , after setting up the above permissions restart the server and try to rerun the script.

    You can use the Procmon tool to trace the issue. Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry, and process/thread activity. You can get the tool from here

    The below thread discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.


    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  3. Sokoban 991 Reputation points

    The problem is already solved , see below :-)

    0 comments No comments