PowerSHell Gallery is not registering

sns 9,251 Reputation points
2022-04-28T10:12:37.167+00:00

I have tried to execute below command attached in screenshot. Please help 197342-errorforpsgallerypng.png197343-powershellerrorinbuild.png

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 40,076 Reputation points
    2022-05-04T22:39:33.343+00:00

    Hi @sns

    Thanks for writing and we are happy to help you regarding the PowerShell script.

    Please find more details about the register command in following URL.

    https://learn.microsoft.com/en-us/powershell/module/powershellget/register-psrepository?view=powershell-7.2

    Kindly try following command to register the PSGallery repository.

    Register-PSRepository -Default

    I'm able to register without any error

    PS C:\Users\ravi2_000> Get-PSRepository

    Name InstallationPolicy SourceLocation
    PSGallery Untrusted *************

    Here is a helpful page with information about Windows PowerShell

    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/powershell

    ------------

    --If the reply is helpful, please Upvote and Accept as answer.--

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.