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

When trying to fix PowerShellGet lack of AllowPrerelease Windows actually blocked me from updating PowerShellGet which I knew is the reason why…

blog

22 Aug 2018 pl

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

[Zobacz obrazy (2)](#pf-content-image-1-0)

When trying to fix **PowerShellGet** lack of **AllowPrerelease **Windows actually blocked me from updating **PowerShellGet **which I knew is the reason why it fails in first place.

> 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

[!\[Błąd PowerShell pokazujący, że Update-Module nie może zaktualizować PowerShellGet, ponieważ moduł nie został zainstalowany przez Install-Module.\](/wp-content/uploads/2018/08/img_5b7c8420818c4.png)](/wp-content/uploads/2018/08/img_5b7c8420818c4.png)

### 💡 How can I fix it?

This is because **PowerShellGet** comes builtin with **Windows 2016** but it's on older version. If you want all bells and whistles you need to install newest version from **PowerShellGallery**.

```powershell
PS C:\Windows\system32> Install-Module PowerShellGet
WARNING: Version '1.0.0.1' of module 'PowerShellGet' is already installed at 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1'. To install version '1.6.7', run Instal
l-Module and add the -Force parameter, this command will install version '1.6.7' in side-by-side with version '1.0.0.1'.

PS C:\Windows\system32> Install-Module PowerShellGet -Force
```

[!\[Konsola PowerShell uruchamiająca Install-Module PowerShellGet -Force po błędzie aktualizacji modułu.\](/wp-content/uploads/2018/08/img_5b7c847552c4b.png)](/wp-content/uploads/2018/08/img_5b7c847552c4b.png)

Finally just restart **PowerShell** session and subsequent commands will work without an issue.

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:8CD8BCAC285E93397D6553806928045E29C64D382C3145E6100FDC9345F05A4D -->
