Reset all settings and start from clean slate?

%3CLINGO-SUB%20id%3D%22lingo-sub-2432032%22%20slang%3D%22en-US%22%3EReset%20all%20settings%20and%20start%20from%20clean%20slate%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2432032%22%20slang%3D%22en-US%22%3E%3CP%3ESomehow%20I%20have%20managed%20to%20get%20myself%20into%20trouble%20by%20registering%20repositories.%3C%2FP%3E%3CP%3ENow%20when%20trying%20to%20install%20some%20simple%20modules%20i%20get%20the%20following%20error%3A%3CBR%20%2F%3E%3CBR%20%2F%3EPS%20C%3A%5CWindows%5Csystem32%26gt%3B%20Install-Module%20-Name%20VMware.PowerCLI%26nbsp%3B%3CBR%20%2F%3EPackageManagement%5CInstall-Package%20%3A%20No%20match%20was%20found%20for%20the%20specified%20search%20criteria%20and%20module%20name%20'VMware.PowerCLI'.%20Try%20Get-PSRepository%20to%20see%20all%20available%20registered%20module%3CBR%20%2F%3Erepositories.%3CBR%20%2F%3EAt%20C%3A%5CProgram%20Files%5CWindowsPowerShell%5CModules%5CPowerShellGet%5C1.0.0.1%5CPSModule.psm1%3A1809%20char%3A21%3CBR%20%2F%3E%2B%20...%20%24null%20%3D%20PackageManagement%5CInstall-Package%20%40PSBoundParameters%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20ObjectNotFound%3A%20(Microsoft.Power....InstallPackage%3AInstallPackage)%20%5BInstall-Package%5D%2C%20Exception%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20NoMatchFoundForCriteria%2CMicrosoft.PowerShell.PackageManagement.Cmdlets.InstallPackage%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20when%20running%26nbsp%3BGet-PSRepository%20I%20get%3A%3C%2FP%3E%3CP%3EPS%20C%3A%5CWindows%5Csystem32%26gt%3B%20Get-PSRepository%3CBR%20%2F%3EWARNING%3A%20Unable%20to%20find%20module%20repositories.%3C%2FP%3E%3CP%3EPS%20C%3A%5CWindows%5Csystem32%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20running%20all%20this%20from%20within%20a%20vmware%20horizon%20VDI%20if%20that%20will%20give%20you%20a%20clue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20reset%20it%20all%20and%20%220%22%20all%20settings%20to%20default%20and%20start%20from%20scratch%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2432032%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2432619%22%20slang%3D%22en-US%22%3ERe%3A%20Reset%20all%20settings%20and%20start%20from%20clean%20slate%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2432619%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1074980%22%20target%3D%22_blank%22%3E%40MKSMN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehave%20you%20tried%20the%20below%20powershell%20command%20to%20re-register%20PSGallery%3F%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ERegister-PSRepository%20-Default%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3Byou%20could%20also%20try%20updating%20PowerShell%20NuGet%20as%20well%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EInstall-PackageProvider%20-Name%20NuGet%20-Force%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Somehow I have managed to get myself into trouble by registering repositories.

Now when trying to install some simple modules i get the following error:

PS C:\Windows\system32> Install-Module -Name VMware.PowerCLI 
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'VMware.PowerCLI'. Try Get-PSRepository to see all available registered module
repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

 

And when running Get-PSRepository I get:

PS C:\Windows\system32> Get-PSRepository
WARNING: Unable to find module repositories.

PS C:\Windows\system32>

 

I am running all this from within a vmware horizon VDI if that will give you a clue.

 

Is there a way to reset it all and "0" all settings to default and start from scratch?

 



2 Replies

@MKSMN 

 

have you tried the below powershell command to re-register PSGallery?

Register-PSRepository -Default

 you could also try updating PowerShell NuGet as well

Install-PackageProvider -Name NuGet -Force

 

@SteveMacNZ I did try it but would not work.

 

But i did find the issue late yesterday afternoon. It was a non standard cert that came down from my cisco umbrella protection that stopped PowerShell from even reaching the repository.

 

I had to export the cert and manually import it. After that and forcing it to use TLS 1.2 it worked great!