Page 1 of 1

ModuleStatus Step Failure

Posted: Thu Nov 07, 2024 7:37 pm
by mikey090tx
@Cubert-

Recently we have seen a failure during the P4A Patch Remedy Scans script and it appears in the Module status steps. I have observed a variety of agents return the following error: import-module : The specified module 'PSWindowsUpdate' was not loaded because no valid module file was found in any module directory.

Re: ModuleStatus Step Failure

Posted: Tue Nov 12, 2024 1:52 pm
by Cubert
Interesting,


The `PSWindowsUpdate` PowerShell module is a third-party module that allows you to manage Windows updates from the command line using PowerShell. It provides cmdlets to check, download, install, and remove updates on local or remote computers.

- **PowerShell Gallery**: The official page for the `PSWindowsUpdate` module on the PowerShell Gallery provides detailed information, including the latest version, dependencies, and usage examples. You can visit it at (https://www.powershellgallery.com/packa ... dowsUpdate).

- **Documentation**: The module's documentation, including cmdlet descriptions and examples, can be found on the PowerShell Gallery page or within the module itself using the `Get-Help` cmdlet.



On the agent in question, execute the following command and see what it returns.

Code: Select all

Install-Module -Name PSWindowsUpdate -Force -Scope CurrentUser
You can verify module installed using the following cmd

Code: Select all

Get-Module -ListAvailable PSWindowsUpdate
If that is good then import the module with the following cmd

Code: Select all

Import-Module PSWindowsUpdate
Lastly, test that the module is working as expected with this cmd

Code: Select all

Get-Command -Module PSWindowsUpdate
It should return a list of available cmds in the module.

Lets see if we can get through this on one of your affected agents. hopefuly it will return an error that we can then resolve.