Too many parameters for command 'open'. WinSCP V5.21.6 PowerShell Core 7.3.1 Issue

Advertisement

Mister H
Guest

Too many parameters for command 'open'. WinSCP V5.21.6 PowerShell Core 7.3.1 Issue

Previously working PowerShell script recently broke. Interesting thing is it still works when running PowerShell 5 desktop and was previously working with PowerShell 7 v7.x.x core until recently. Tried updating to WinSCP v5.21.6 but it didn't help.
"C:\program files\powershell\7\pwsh.exe" -noprofile -windowstyle hidden -executionpolicy bypass -file C:\Users\**********************\Documents\CleverExport-Debug.ps1
Throws the error:
Too many parameters for command 'open'.
Yes, I've reviewed the other posts relating to this same error but couldn't find anything specific to why PS7 core would break all of the sudden. It could be related to a MSFT update but that's just a blind guess.
  • files.zip (2.42 KB, Private file)
Description: sample script and transcripts showing working ps5 and not working ps7 sessions

Reply with quote

Advertisement

Mister H
Guest

Confirmed, that was the issue. Setting that variable to "Legacy" allowed the PowerShell v7.3.1 Core script to work again. Thank you Martin!

Reply with quote

Advertisement

You can post new topics in this forum