Hiren Parghi
Hiren Parghi

Reputation: 1895

the specified module 'pswindowsupdate' was not loaded because no valid module file was found in any module directory

Window updates are always saying checking for updates and process is running without any update install. Hence, I am trying to install window updates using the Windows PowerShell button. However, I have found the error below when I used the following command in Powershell:

Import-Module PSWindowsUpdate

the specified module 'pswindowsupdate' was not loaded because no valid module file was found in any module directory

Can anyone help ?

Upvotes: 1

Views: 9530

Answers (2)

Rick Kotlarz
Rick Kotlarz

Reputation: 21

I had this same issue with the Security & Compliance PowerShell when I ran:

Import-Module ExchangeOnlineManagement 

Looking into it further I discovered that you can use the "Find-Module" cmdlet to search and install it:

Find-Module -Name ExchangeOnlineManagement | Install-Module

In your situation you'll want to execute the following:

Find-Module -Name PSWindowsUpdate | Install-Module

Reference: https://learn.microsoft.com/en-us/powershell/module/powershellget/install-module?view=powershell-7.3#example-1-find-and-install-a-module

Upvotes: 2

Hiren Parghi
Hiren Parghi

Reputation: 1895

Yes,

I have downloaded the "PSWindowupdate.zip" from here. https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc to %USERPROFILE%\Documents\WindowsPowerShell\Modules which fixed the issue.

Upvotes: 0

Related Questions