potatoqualitee / kbupdate

🛡 KB Viewer, Saver, Installer and Uninstaller
MIT License
338 stars 50 forks source link

`Could not find the module '<xWindowsUpdate, 3.0.0>'.` #209

Closed branpurn closed 1 year ago

branpurn commented 1 year ago

Calling Install-KbUpdate like so,

Install-Module kbupdate -Scope CurrentUser -Force -Confirm:$False
Import-Module kbupdate -Force
Install-KbUpdate -ComputerName $RemoteHost -HotfixId $Hotfix -Verbose

I am getting the following error output and it is appearing to hang,

Exception calling "Create" with "1" argument(s): "At line:3 char:29
+ ...             Import-DscResource -ModuleName xWindowsUpdate -ModuleVers ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could not find the module '<xWindowsUpdate, 3.0.0>'."
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ParseException
    + PSComputerName        : localhost

I might be running into issues with environment constraint of user execution being blocked outside of a single directory in the root of C:\

What I can get from the scrollback is as follows:

VERBOSE: [15:55:47][Invoke-KbCommand] Connecting to session using Invoke-PSFCommand
VERBOSE: [15:55:47][Invoke-PSFCommand] Invoking command against ComputerHostname
VERBOSE: [15:55:47][<ScriptBlock><Process>] File not detected on ComputerHostname, downloading now to C:\Users\DomainAdminAcc\Downloads and copying to remote computer
VERBOSE: [15:55:47][<ScriptBlock><Process>] Checking for home downloads directory
VERBOSE: [15:55:47][Save-KbUpdate] Processing link parameter set
VERBOSE: [15:55:47][Save-KbUpdate] Link: https://catalog.s.download.windowsupdate.com/c/msdownload/update/software/secu/2022/11/windows10.0-kb5019959-x64_f59ff662d3acdd1e71a46899e4c2c82b252f365b.msu
VERBOSE: [15:55:47][Save-KbUpdate] FilePath: C:\Users\DomainAdminAcc\Downloads\windows10.0-kb5019959-x64_f59ff662d3acdd1e71a46899e4c2c82b252f365b.msu
VERBOSE: [15:55:47][Save-KbUpdate] File: C:\Users\DomainAdminAcc\Downloads\windows10.0-kb5019959-x64_f59ff662d3acdd1e71a46899e4c2c82b252f365b.msu
VERBOSE: [15:55:49][Save-KbUpdate] Adding windows10.0-kb5019959-x64_f59ff662d3acdd1e71a46899e4c2c82b252f365b.msu to download queue
VERBOSE: [15:55:49][Save-KbUpdate] Starting job process
VERBOSE: [15:56:15][<ScriptBlock><Process>] Update is not located on a file server and not local, copying over the remote server
VERBOSE: [15:56:15][Invoke-KbCommand] Connecting to session using Invoke-PSFCommand
VERBOSE: [15:56:15][Invoke-PSFCommand] Invoking command against ComputerHostname
VERBOSE: [16:02:05][<ScriptBlock><Process>] It's a WSU file
VERBOSE: [16:02:05][<ScriptBlock><Process>] ArgumentList is
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Get-DSCConfiguration.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Get-DSCLocalConfigurationManager.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Restore-DSCConfiguration.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Get-DscConfigurationStatus.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Stop-DscConfiguration.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Remove-DscConfigurationDocument.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Disable-DscDebug.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\Enable-DscDebug.cdxml'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DSCClassResources\WindowsPackageCab\WindowsPackageCab.psd1'.
VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DSCClassResources\WindowsPackageCab\WindowsPackageCab.psm1'.
Exception calling "Create" with "1" argument(s): "At line:3 char:29
+ ...             Import-DscResource -ModuleName xWindowsUpdate -ModuleVers ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could not find the module '<xWindowsUpdate, 3.0.0>'."
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ParseException
    + PSComputerName        : localhost

VERBOSE: [16:02:11][Invoke-KbCommand] Connecting to session using Invoke-PSFCommand
VERBOSE: [16:02:11][Invoke-PSFCommand] Invoking command against ComputerHostname
VERBOSE: Installing C:\Users\DomainAdminAcc\Downloads\windows10.0-kb5019959-x64_f59ff662d3acdd1e71a46899e4c2c82b252f365b.msu
VERBOSE: DSC appears to be available on this system. Using Invoke-DscResource.
VERBOSE: Populating RepositorySourceLocation property for module xWindowsUpdate.
VERBOSE: Populating RepositorySourceLocation property for module xWindowsUpdate.
branpurn commented 1 year ago

It looks like the install was successful given time. Not sure if the error is affecting anything meaningful.