SteamPS icon indicating copy to clipboard operation
SteamPS copied to clipboard

Install-SteamCMD fails, Test-Path: Cannot bind argument

Open suckmyhardware opened this issue 1 year ago • 2 comments

Describe "Module Bug or Issue"

Installing SteamCMD via Powershell. First installing the SteamPS, which is fine. As soon as I start installing SteamCMD through Powershell it fails.

Context "The Problem"

  • Installing SteamPS
  • Installing SteamPS
  • Installing fails with

Test-Path : Cannot bind argument to parameter 'Path' because it is null. At C:\Program Files\WindowsPowerShell\Modules\SteamPS\4.1.0\SteamPS.psm1:1275 char:29 if (Test-Path -Path (Get-SteamPath).Executable) { CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand

Corresponding line in the SteamPS.psm1:

if (Test-Path -Path (Get-SteamPath).Executable) {

Output of Get-Module:

Get-Module -Name SteamPS -ListAvailable | Select-Object -Property Name, Version

Name Version SteamPS 4.1.0

suckmyhardware avatar Jul 14 '24 21:07 suckmyhardware

  1. What OS are you running?
  2. Could you lookup your Environment Variables in Windows Settings and see if SteamCMD is added to the path there? image

hjorslev avatar Jul 18 '24 19:07 hjorslev

Same issue on Windows Server 2025 Standard.

By default, this is the $PSVersionTable.PSVersion:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      26100  2161

Within an administrator PS, run the following to install the newest version:

winget install --id Microsoft.PowerShell --source winget

Restarting as Powershell 7, $PSVersionTable.PSVersion now returns...

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      4      6

and running the Install-SteamCMD now works fine. :)

szalkerous avatar Dec 01 '24 03:12 szalkerous