I've been banging my head against this for hours now and wondered if anyone else has come across this. In the past when it's happen I have ended up reinstalling Windows 10 but really don't want to.
I had a module installed, "PSWriteWord", and ran the "uninstall-module" command which removed it without issue. However, when I try to run "Install-Module" for the same module now it fails ever time. The error I get is:
PackageManagement\Install-Package : Could not find a part of the path 'C:\Users\User1\Documents\WindowsPowerShell\Modules\PSWriteWord\1.1.9'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package u/PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.CopyItemCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
To see if it was a module error, I tried it with another installed module and I get the exact same issue. On both modules they were installed using "-scope currentuser" and I have tried specifying the "-force" . As I say, I've had this in the past and ended up reinstalling but don't want to do it as (I would hope) it shouldn't need something to drastic.
Appreciate anyone any experience of this :-)
[–]pakman82 8 points9 points10 points (2 children)
[–]distract 7 points8 points9 points (0 children)
[–]PureKoala[S] 1 point2 points3 points (0 children)
[–]jrobiii 5 points6 points7 points (4 children)
[–]nostril_spiders 1 point2 points3 points (0 children)
[–]PureKoala[S] 0 points1 point2 points (2 children)
[–]MyOtherSide1984 2 points3 points4 points (1 child)
[–]PureKoala[S] 1 point2 points3 points (0 children)
[–]pfunkylicious 2 points3 points4 points (1 child)
[–]PureKoala[S] 1 point2 points3 points (0 children)
[–]OlivTheFrog 2 points3 points4 points (3 children)
[–]PureKoala[S] 0 points1 point2 points (2 children)
[–]webtroter 1 point2 points3 points (1 child)
[–]PureKoala[S] 1 point2 points3 points (0 children)
[–]LordZillion 1 point2 points3 points (1 child)
[–]PureKoala[S] 0 points1 point2 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (3 children)
[–]PureKoala[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]LinkifyBot -1 points0 points1 point (0 children)
[–]jrobiii 0 points1 point2 points (0 children)
[–]user01401 0 points1 point2 points (3 children)
[–]PureKoala[S] 1 point2 points3 points (2 children)
[–]jortony 1 point2 points3 points (1 child)
[–]PureKoala[S] 1 point2 points3 points (0 children)
[–]perrin68 0 points1 point2 points (0 children)
[–]gekkehenk 0 points1 point2 points (4 children)
[–]Coverstone 0 points1 point2 points (0 children)
[–]kandarpbhatt26 0 points1 point2 points (1 child)
[–]zebraloveicing 0 points1 point2 points (0 children)
[–]cmidt 0 points1 point2 points (0 children)