79755690

Date: 2025-09-04 12:12:05
Score: 1
Natty:
Report link
After reading the comment of mklement, I created the following working code:

powershell -Command ^
$COMPORT=(Get-WmiObject Win32_SerialPort ^| Select-Object Name, DeviceID ^| ^
Where-Object { $_.Name -like 'USB Serial Device*' } ^| Select-Object -ExpandProperty DeviceID); ^
Write-Host \"Using COM port:[$COMPORT]\"; Start-Process -Wait -FilePath putty -ArgumentList ^
\"-serial $COMPORT -sercfg 9600,8,n,1,N\""
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sándor Rózsa