# PowerShellGallery – You are installing modules from an untrusted repository

When you start working with PowerShell Modules you often find yourself in having to approve module updates over and over and…

blog

19 Aug 2018 pl

![PowerShellGallery – You are installing modules from an untrusted repository](/wp-content/uploads/2018/08/img_5b79ad11d0060.png)

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

When you start working with **PowerShell Modules **you often find yourself in having to approve module updates over and over and over.

```powershell
Install-Module PSWriteWord -AllowPrerelease
```

[!\[Monit Install-Module ostrzegajacy, ze PSGallery jest niezaufanym repozytorium przed instalacja PSWriteWord.\](/wp-content/uploads/2018/08/img_5b79ab3b7bfd1.png)](/wp-content/uploads/2018/08/img_5b79ab3b7bfd1.png)

While it's great if you don't trust **PowerShellGallery **I tend to trust that gallery because Microsoft runs it and I only install modules I've verified prior to installation.

### 💡 How can I trust PowerShellGallery?

```powershell
Get-PSRepository
```

[!\[Wynik Get-PSRepository pokazujacy szczegoly repozytorium PSGallery wraz z biezaca polityka instalacji.\](/wp-content/uploads/2018/08/img_5b79ac1626261.png)](/wp-content/uploads/2018/08/img_5b79ac1626261.png)

To fix this problem simply use command below to set **InstallationPolicy **to trusted.

```powershell
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
```

[!\[Wynik polecenia Set-PSRepository po zmianie polityki instalacji PSGallery na Trusted.\](/wp-content/uploads/2018/08/img_5b79ad11d0060.png)](/wp-content/uploads/2018/08/img_5b79ad11d0060.png)

That's all. Simple one line of code and you trust **PowerShellGallery **and can install modules from there without any prompts.

## 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:7659E086C01A21DCEA95631287888DF33AEDB279095027706DEA6AAAE4A325AD -->
