PowerShell

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 over.

Install-Module PSWriteWord -AllowPrerelease

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?
Get-PSRepository

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

Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted

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

Przemyslaw Klys

System Architect with over 14 years of experience in the IT field. Skilled, among others, in Active Directory, Microsoft Exchange and Office 365. Profoundly interested in PowerShell. Software geek.

Share
Published by
Przemyslaw Klys

Recent Posts

Upgrade Azure Active Directory Connect fails with unexpected error

Today, I made the decision to upgrade my test environment and update the version of…

2 months ago

Mastering Active Directory Hygiene: Automating Stale Computer Cleanup with CleanupMonster

Have you ever looked at your Active Directory and wondered, "Why do I still have…

3 months ago

Active Directory Replication Summary to your Email or Microsoft Teams

Active Directory replication is a critical process that ensures the consistent and up-to-date state of…

7 months ago

Syncing Global Address List (GAL) to personal contacts and between Office 365 tenants with PowerShell

Hey there! Today, I wanted to introduce you to one of the small but excellent…

12 months ago

Active Directory Health Check using Microsoft Entra Connect Health Service

Active Directory (AD) is crucial in managing identities and resources within an organization. Ensuring its…

1 year ago

Seamless HTML Report Creation: Harness the Power of Markdown with PSWriteHTML PowerShell Module

In today's digital age, the ability to create compelling and informative HTML reports and documents…

1 year ago