0

I am trying to run the below command but I am getting an error message:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module -Name PackageManagement,PowerShellGet -AllowClobber -Force -SkipPublisherCheck

Error message:

WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.

I am running on a windows server and on PowerShell 5.1.

I've tried to remove the module and uninstall the module and I get the same error, the server has also had a reboot and there are no other users on it.

Djordje Nedovic
  • 559
  • 8
  • 20

1 Answers1

0

The default versions of these are in the Windows system directory and should not be deleted.

You should install all elements individually to avoid "in use" errors

Update Nuget then install/update to the latest version of PowerShellGet:

Install-PackageProvider Nuget –Force
Install-Module -Name PackageManagement -AllowClobber -Force
Install-Module –Name PowerShellGet –Force -AllowClobber

Get-Module -ListAvailable PackageManagement, PowerShellGet
Scepticalist
  • 3,737
  • 1
  • 13
  • 30