# Update-Module : Module ‘PowershellGet’ was not installed by using Install-Module, so it cannot be updated.

This PowerShellGet error usually means Windows is using the inbox module version, so you need to install a newer copy side by side instead of updating it in place.

blog

22 Aug 2018 en

![Update-Module : Module ‘PowershellGet’ was not installed by using Install-Module, so it cannot be updated.](/wp-content/uploads/2018/08/img_5b7c847552c4b.png)

[View images (2)](#pf-content-image-1-0)

This error usually appears when a machine is using the **PowerShellGet** version that shipped with Windows rather than a copy that was previously installed from **PSGallery**. In other words, `Update-Module` is doing exactly what it is supposed to do: it refuses to update something that was not originally installed with `Install-Module`.

> Update-Module : Module ‘PowershellGet' was not installed by using Install-Module, so it cannot be updated. At line:1 char:1
> 
> - Update-Module PowershellGet
> - CategoryInfo : InvalidOperation: (PowershellGet:String) [Write-Error], WriteErrorException
> - FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module

[!\[PowerShell error showing that Update-Module cannot update PowerShellGet because the module was not installed with Install-Module.\](/wp-content/uploads/2018/08/img_5b7c8420818c4.png)](/wp-content/uploads/2018/08/img_5b7c8420818c4.png)

## Why it happens

Older Windows and Windows Server builds often include an inbox version of **PowerShellGet**. That built-in copy is real and usable, but it is not considered an installed gallery package, so `Update-Module` will not service it directly.

## Working fix

Instead of trying to update the inbox copy, install a newer version side by side from **PSGallery**:

```powershell
Install-Module PowerShellGet -Force
```

If you prefer not to install for all users, use:

```powershell
Install-Module PowerShellGet -Force -Scope CurrentUser
```

That installs a newer copy without removing the OS-provided version.

[!\[PowerShell console installing PowerShellGet with Install-Module -Force after the update error.\](/wp-content/uploads/2018/08/img_5b7c847552c4b.png)](/wp-content/uploads/2018/08/img_5b7c847552c4b.png)

## Verify what is available

After installation, restart PowerShell and confirm the newer version is now visible:

```powershell
Get-Module PowerShellGet -ListAvailable | Sort-Object Version -Descending
```

## Related symptom

One common reason people hit this problem is because they were trying to use `Install-Module -AllowPrerelease` and the parameter did not exist on their old PowerShellGet build. Once the newer module is installed and the session is restarted, that scenario usually goes away as well.

## Related Projects

Projects that align with this post's tags, categories, and content.

[All projects](/projects/)

Matching projects...

[Back to Blog](/blog)

## Related posts

- [Set-PSRepository Installation Policy Trusted – Invalid Class Error](/blog/set-psrepository-installation-policy-trusted-invalid-class-error/)
- [Install-module : The ‘install-module’ command was found in the module ‘PowerShellGet’, but the module could not be loaded.](/blog/install-module-the-install-module-command-was-found-in-the-module-powershellget-but-the-module-could-not-be-loaded/)
- [Install-Module : A parameter cannot be found that matches parameter name AllowPrerelease.](/blog/install-module-a-parameter-cannot-be-found-that-matches-parameter-name-allowprerelease/)

<!-- PowerForge markdown artifact sha256:49A58E1D663565081040EFB19269F8742E13470694BEEC3635448827515777AD -->
