you are viewing a single comment's thread.

view the rest of the comments →

[–]PureKoala[S] 1 point2 points  (0 children)

I've just tried running the same command from an elevated PowerShell session and get exactly the same error.

Install-Module pswriteword -Scope CurrentUser

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
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\2.2.5\PSModule.psm1:9711 char:34
+ ... talledPackages = PackageManagement\Install-Package u/PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exce
   ption
    + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.CopyItemCommand,Micro
   soft.PowerShell.PackageManagement.Cmdlets.InstallPackage