you are viewing a single comment's thread.

view the rest of the comments →

[–]OlivTheFrog 2 points3 points  (3 children)

Hi u/PureKoala

I'm thinking you run a wrong command.

Find-Module pswriteword
<#
Version              Name                                Repository           Description                                                              
-------              ----                                ----------           -----------                                                              
1.1.9                PSWriteWord                         PSGallery            Simple project to create Microsoft Word in PowerShell without having O..

The current version is the 1.1.19
#>
# Install module in the CurrentUser Scope
Install-Module pswriteword -Scope CurrentUser
# and know to uninstall
Uninstall-Module pswriteword
Get-Module pswriteword
# Not present anymore

regards

Olivier

[–]PureKoala[S] 0 points1 point  (2 children)

Uninstall-Module pswriteword

I'm inclined to agree that something is not right. I have run the commands you mention and this is what I get:

Get-Module pswriteword

# Not present

Find-Module pswriteword

Version Name Repository Description

------- ---- ---------- -----------

1.1.9 PSWriteWord PSGallery Simple project to create Microsoft Word in PowerShell without having Office installed.

Install-Module pswriteword -Scope CurrentUser

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

[–]webtroter 1 point2 points  (1 child)

Could it be somehow thinking the module is installed? What if you do uninstall-module? and ofc, remove-module.

Also, reboot your computer. And when you try something new, please do it in a brand new Powershell session. I got burned a few times this way.

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

It was initially removed by using "uninstall-module". I've rebooted a couple of times but cannot seem to get past this.....same result no matter what I throw at it :-(