Use "VISA Find Resource" that outputs a string array of available resources. In a loop, open the resources and read the "Interface Information>Interface Description" VISA property node. Parse the description string for the occurence of "COM" to find serial ports.
However, "VISA Find Resource" won't output serial ports that are currently in use by other application.