Skip to content

Windows installer fails when Pscx shadows Expand-Archive #651

Description

@codywilliamson

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

  1. Install/import Pscx 3.3.2 in PowerShell 7.6.5.

  2. Verify that Get-Command Expand-Archive resolves to the Pscx module.

  3. Run the official installer:

    irm https://downloads.slack-edge.com/slack-cli/install-windows.ps1 | iex
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions