When trying to fix PowerShellGet lack of AllowPrerelease Windows actually blocked me from updating PowerShellGet which I knew is the reason why it fails in first place.
When trying to fix PowerShellGet lack of AllowPrerelease Windows actually blocked me from updating PowerShellGet which I knew is the reason why it fails in first place.
Update-Module : Module ‘PowershellGet' was not installed by using Install-Module, so it cannot be updated.
At line:1 char:1
+ Update-Module PowershellGet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (PowershellGet:String) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module
This is because PowerShellGet comes builtin with Windows 2016 but it's on older version. If you want all bells and whistles you need to install newest version from PowerShellGallery.
PS C:\Windows\system32> Install-Module PowerShellGet WARNING: Version '1.0.0.1' of module 'PowerShellGet' is already installed at 'C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1'. To install version '1.6.7', run Instal l-Module and add the -Force parameter, this command will install version '1.6.7' in side-by-side with version '1.0.0.1'. PS C:\Windows\system32> Install-Module PowerShellGet -Force
Finally just restart PowerShell session and subsequent commands will work without an issue.
This post was last modified on %s = human-readable time difference 08:57
Today, I made the decision to upgrade my test environment and update the version of…
Have you ever looked at your Active Directory and wondered, "Why do I still have…
Active Directory replication is a critical process that ensures the consistent and up-to-date state of…
Hey there! Today, I wanted to introduce you to one of the small but excellent…
Active Directory (AD) is crucial in managing identities and resources within an organization. Ensuring its…
In today's digital age, the ability to create compelling and informative HTML reports and documents…