New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShellGet 2.0.0 #2640

Closed
FeodorFitsner opened this Issue Sep 15, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@FeodorFitsner
Member

FeodorFitsner commented Sep 15, 2018

Announcement: https://blogs.msdn.microsoft.com/powershell/2018/09/12/new-look-and-features-for-powershell-gallery/

In response to #2639 we are updating PowerShellGet to 2.0.0 on build worker VMs.

Following this guide I came up with the following upgrade procedure that seems to work:

New-Item -Type Directory C:\LocalFolder
Save-Module PowerShellGet -Path C:\LocalFolder
Exit

Run PowerShell again:

Remove-Item $env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\ -Recurse -Force
Remove-Item $env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\ -Recurse -Force

Copy-Item "C:\LocalFolder\PowerShellGet\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\" -Recurse -Force
Copy-Item "C:\LocalFolder\PackageManagement\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\" -Recurse -Force

Remove-Item C:\LocalFolder -Recurse -Force

"Fix" Install-Module on VS 2017 image:

Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment