Closed ousturali closed 4 years ago
Make sure you have PowerShell 5.1
Install-Module PowerShellGet -Force
let it update/restart Powershell and try again.
unfortunately it didnt help.It gave the error
WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 char:21
+ CategoryInfo : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pac
kageProvider], Exception
+ FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackagePro
vider
PackageManagement\Import-PackageProvider : No match was found for the specified search criteria and provider name 'NuGet'. Try 'Get-PackageProvider -ListAvailable' to see if the provider exists on the system. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7411 char:21
+ CategoryInfo : InvalidData: (NuGet:String) [Import-PackageProvider], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.ImportPackageProv
ider
WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. PackageManagement\Get-PackageProvider : Unable to find package provider 'NuGet'. It may not be imported yet. Try 'Get-PackageProvider -ListAvailable'. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7415 char:30
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...PackageProvider:GetPackageProvider) [Get-PackageProvi
der], Exception
+ FullyQualifiedErrorId : UnknownProviderFromActivatedList,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPacka
geProvider
Install-Module : NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed. At line:1 char:1
+ CategoryInfo : InvalidOperation: (:) [Install-Module], InvalidOperationException
+ FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Module
Stupid question. DO you have the internet? Get-PSRepository
what does that show?
yes ,i have internet
output is
PS C:\Users\Administrator> Get-PSRepository
Name InstallationPolicy SourceLocation
PSGallery Untrusted https://www.powershellgallery.com/api/v2
can you reach that gallery from that PC?
Yes i can ,when i try from the browser an xml page welcomes
Hi again I had installed a new windos10 machine,and RSAT as you had mentioned. Then i can successfully tested your wonderful script.Thank you very much. I appreciate your work. great job.
hi , i want to try your code ,in a windows 2012R2 dc, but couldnt manage, i tried to install with (Install-Module -Name Testimo -AllowClobber -Force) but it gave me errror (dependecy for nuget )
then i tried to install it with (Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force) also it didnt worked,
Can you advise anything else (i thnik i manually insall nuget on my dc )