Windows 10: error in opening serial port with Powershell

Discus and support error in opening serial port with Powershell in Windows 10 Drivers and Hardware to solve the problem; Hello, I have installed a plug-and-play measurement instrument, with a USB terminal, and it appears as a serial COM port. In windows device... Discussion in 'Windows 10 Drivers and Hardware' started by Francois Bondu, Apr 1, 2021.

  1. error in opening serial port with Powershell


    Hello,


    I have installed a plug-and-play measurement instrument, with a USB terminal, and it appears as a serial COM port.


    In windows device manager, COM3 is the only port.

    with properties / main tab, the status says that the device works properly.


    I want exchange API commands via powershell. There is an error at the open step.

    Could you help?


    Thanks


    >> $port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,One
    >> $port.NewLine = '\r'
    >> $port.ReadTimeout = 100
    >> $port.WriteTimeout = 100
    >> Start-Sleep -Milliseconds 100
    >> $port.open
    >> Start-Sleep -Milliseconds 100
    >> $port
    COM3
    Exception lors de l'appel de « Open » avec « 0 » arguments : « Paramètre incorrect.
    »
    Au caractère Ligne:7 : 1
    + $port.open
    + ~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: : [], MethodInvocationException
    + FullyQualifiedErrorId : IOException



    BaseStream :
    BaudRate : 9600
    BreakState :
    BytesToWrite :
    BytesToRead :
    CDHolding :
    CtsHolding :
    DataBits : 8
    DiscardNull : False
    DsrHolding :
    DtrEnable : False
    Encoding : System.Text.ASCIIEncoding
    Handshake : None
    IsOpen : False
    NewLine : \r
    Parity : None
    ParityReplace : 63
    PortName : COM3
    ReadBufferSize : 4096
    ReadTimeout : 100
    ReceivedBytesThreshold : 1
    RtsEnable : False
    StopBits : One
    WriteBufferSize : 2048
    WriteTimeout : 100
    Site :

    :)
     
    Francois Bondu, Apr 1, 2021
    #1
  2. Naresh_K Win User

    Changing the Port settings for Serial-USB.

    Hi,



    Thank you for writing to Microsoft Community Forums.

    If you want to change the port settings, please follow the steps mentioned below:

    1. Open Device manager (right click on start button
      and then on Device manager).
    2. Then expand port (COMS & LPT).
    3. Then right click on Prolific USB-to Serial Comm Port and then on properties.
    4. Go to port settings and click on Advanced.
    5. You will be able to make the changes on this screen.


    Hope this helps.
     
    Naresh_K, Apr 1, 2021
    #2
  3. Change serial port defaults, Windows 10

    Thanks for helping. I have done the steps but still unable to connect the serial to this router. Devices and Printers only ever shows generic PnP monitor. PuTTy just shows unable to open the serial port.
     
    BJ Richards, Apr 1, 2021
    #3
  4. Drone Win User

    error in opening serial port with Powershell

    Drone, Apr 1, 2021
    #4
Thema:

error in opening serial port with Powershell

Loading...
  1. error in opening serial port with Powershell - Similar Threads - error opening serial

  2. Windows 10 and serial ports

    in Windows 10 Drivers and Hardware
    Windows 10 and serial ports: Can windows 10 support serial ports. I installed a dual port serial card PCI Express and I cannot get it to work. https://answers.microsoft.com/en-us/windows/forum/all/windows-10-and-serial-ports/4315b8d9-2ac5-4df6-8518-55aa038de787
  3. USB Serial Port driver clash in Serial controllers

    in Windows 10 Drivers and Hardware
    USB Serial Port driver clash in Serial controllers: my FTDI driver for usb serial converter creates a COM port but when i install a different driver for my casio CESG in serial controllers the COM port becomes hidden, and message with this hardware device is not connected to the computer. Code 45 I had this working once too!...
  4. USB Serial Port driver clash in Serial controllers

    in Windows 10 Gaming
    USB Serial Port driver clash in Serial controllers: my FTDI driver for usb serial converter creates a COM port but when i install a different driver for my casio CESG in serial controllers the COM port becomes hidden, and message with this hardware device is not connected to the computer. Code 45 I had this working once too!...
  5. USB Serial Port driver clash in Serial controllers

    in Windows 10 Software and Apps
    USB Serial Port driver clash in Serial controllers: my FTDI driver for usb serial converter creates a COM port but when i install a different driver for my casio CESG in serial controllers the COM port becomes hidden, and message with this hardware device is not connected to the computer. Code 45 I had this working once too!...
  6. Serial Port Driver

    in Windows 10 Drivers and Hardware
    Serial Port Driver: I need to install a serial port driver. Where can I find such a driver? https://answers.microsoft.com/en-us/windows/forum/all/serial-port-driver/4a31f06a-0c90-4c1d-9379-6e1b6d982898
  7. USB serial port driver

    in Windows 10 Drivers and Hardware
    USB serial port driver: Need a serial port driver fir Windies 10 https://answers.microsoft.com/en-us/windows/forum/all/usb-serial-port-driver/92feaf39-367d-48ad-abf8-fe3a1c148ae8
  8. Serial com ports.

    in Windows 10 Drivers and Hardware
    Serial com ports.: I am trying to use a USB-RS232 lead on my laptop. I cannot create any COM ports and none are there by default. If I try this on my desktop it works perfectly. When trying to create a COM port I get an invalid parameter error and the creation fails Windows 10 Home...
  9. BSOD serial-port

    in Windows 10 BSOD Crashes and Debugging
    BSOD serial-port: BSOD when the program Siemens STARTER using the serial-port. 77830
  10. Are Serial Ports Available ?

    in Windows 10 Drivers and Hardware
    Are Serial Ports Available ?: I have a Shuttle (SH67) Computer running WIN10, 64 bit, for an O/S. Are there cards available to give me Serial Ports ? A Google search was useless !! Thanks, Richard S. 31197