Description
The official Windows installer fails in PowerShell when the Pscx module is installed. Pscx 3.3.2 provides an Expand-Archive cmdlet that shadows the archive cmdlet from Microsoft.PowerShell.Archive. The installer invokes Expand-Archive without module qualification and passes -DestinationPath, which the Pscx command does not support.
The download succeeds: %LOCALAPPDATA%\\slack-cli\\slack_cli.zip is a valid archive containing bin/slack.exe. The installer stops before extraction and before updating PATH, so slack is not available in a new session.
CLI Version
Installer script (pre-install failure; no Slack CLI binary version available)
Operating System
Windows 11; PowerShell 7.6.5; Pscx 3.3.2
Steps to Reproduce
-
Install/import Pscx 3.3.2 in PowerShell 7.6.5.
-
Verify that Get-Command Expand-Archive resolves to the Pscx module.
-
Run the official installer:
irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 | iex
-
When the installer reaches extraction, observe the parameter error for -DestinationPath.
Expected Result
The installer extracts bin/slack.exe, updates the user PATH, and completes successfully regardless of unrelated modules that define commands with the same name.
Actual Result
The installer downloads the archive but fails at extraction with an error equivalent to:
A parameter cannot be found that matches parameter name 'DestinationPath'.
Get-Command Expand-Archive resolves to Pscx rather than Microsoft.PowerShell.Archive, and the installer exits before extraction and PATH update.
Suggested Fix
Module-qualify the call as Microsoft.PowerShell.Archive\\Expand-Archive (or otherwise avoid ambiguous command resolution), for example:
Microsoft.PowerShell.Archive\\Expand-Archive -LiteralPath "$slack_cli_dir\\slack_cli.zip" -DestinationPath $slack_cli_dir -Force
Description
The official Windows installer fails in PowerShell when the Pscx module is installed. Pscx 3.3.2 provides an
Expand-Archivecmdlet that shadows the archive cmdlet fromMicrosoft.PowerShell.Archive. The installer invokesExpand-Archivewithout module qualification and passes-DestinationPath, which the Pscx command does not support.The download succeeds:
%LOCALAPPDATA%\\slack-cli\\slack_cli.zipis a valid archive containingbin/slack.exe. The installer stops before extraction and before updating PATH, soslackis not available in a new session.CLI Version
Installer script (pre-install failure; no Slack CLI binary version available)
Operating System
Windows 11; PowerShell 7.6.5; Pscx 3.3.2
Steps to Reproduce
Install/import Pscx 3.3.2 in PowerShell 7.6.5.
Verify that
Get-Command Expand-Archiveresolves to the Pscx module.Run the official installer:
When the installer reaches extraction, observe the parameter error for
-DestinationPath.Expected Result
The installer extracts
bin/slack.exe, updates the user PATH, and completes successfully regardless of unrelated modules that define commands with the same name.Actual Result
The installer downloads the archive but fails at extraction with an error equivalent to:
Get-Command Expand-Archiveresolves toPscxrather thanMicrosoft.PowerShell.Archive, and the installer exits before extraction and PATH update.Suggested Fix
Module-qualify the call as
Microsoft.PowerShell.Archive\\Expand-Archive(or otherwise avoid ambiguous command resolution), for example: