okibcn / wslcompact

Compacts the size of the ever-growing WSL vhdx images.
https://github.com/okibcn/wslcompact
GNU General Public License v3.0
805 stars 19 forks source link

" A parameter cannot be found that matches parameter name 'DestinationPath'." when following install instructions #10

Closed mikemaccana closed 1 year ago

mikemaccana commented 1 year ago

Per the README:

 $ iwr -useb https://raw.githubusercontent.com/okibcn/wslcompact/main/setup | iex
Downloading WslCompact...Done.
WslCompact Module installed. Type wslcompact -h to know more about it.
Expand-Archive:
Line |
  50 |  … -Archive -LiteralPath "$WCTEMP/wclatest.zip" -DestinationPath "$WCTEM …
     |                                                 ~~~~~~~~~~~~~~~~
     | A parameter cannot be found that matches parameter name 'DestinationPath'.
Copy-Item:
Line |
  51 |  Copy-Item "$WCTEMP/WslCompact" "$TARGET" -Force -Recurse | Out-Null
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\Users\mikem\AppData\Local\Temp\wslcompacttemp\WslCompact' because it does not exist.
okibcn commented 1 year ago

-destinationPath is a valid parameter of Expand-Archive. Can you please provide the output of:

$PSVersionTable

Even the default PowerShell that comes with Windows accepts that parameter.

okibcn commented 1 year ago

Can't reproduce the issue. Should the issue persists, please report it.