$objWMIService = objget("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$colBios = $objWMIService.ExecQuery("Select * from Win32_PNPEntity")
For $object in $colBios
$bios = StringMid($object.Caption,1)
$t=StringInStr ( $bios,"USB Serial Port " )
;MsgBox(0,"",$t)
If $t>0 then
$p=StringRegExpReplace ( $bios, '(\D)', "" )
MsgBox(0,"",$p)
endif
Next