WSUS install offline with PS

Sokoban 1,056 Reputation points
2022-10-12T13:47:03.357+00:00

Hi

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 http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f  
At line:1 char:1  
+ Install-WindowsFeature -Name UpdateServices -IncludeManagementTools - ...  
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],  
    Exception  
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWind  
   owsFeatureCommand  

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.
13,726 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,628 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 49,296 Reputation points Microsoft External Staff
    2022-10-13T06:56:05.85+00:00

    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 10,106 Reputation points MVP
    2022-10-12T15:30:53.623+00:00

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


  2. Limitless Technology 44,711 Reputation points
    2022-10-14T09:35:23.933+00:00

    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 https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

    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.
    https://learn.microsoft.com/en-us/answers/questions/556051/wsus-reinstallation-and-post-install-configuration.html

    --------------------------------------------------------------------------------------------------------------------------------------------

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

    0 comments No comments

  3. Sokoban 1,056 Reputation points
    2022-10-14T09:52:51.217+00:00

    Hi
    The problem is already solved , see below :-)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.