diff --git a/Dynamic Folder/Attached Serial Devices/Attached Serial Devices (PowerShell - Windows & Mac).rdfx b/Dynamic Folder/Attached Serial Devices/Attached Serial Devices (PowerShell - Windows & Mac).rdfx
new file mode 100644
index 0000000..9c59913
--- /dev/null
+++ b/Dynamic Folder/Attached Serial Devices/Attached Serial Devices (PowerShell - Windows & Mac).rdfx
@@ -0,0 +1,162 @@
+ This script utilizes PowerShell to generate a list of available serial devices, along with RTS Custom Properties defining speeds and framing settings, to generate a set of Terminal connections for each combination of port/speed/framing. The resulting folder structure will look something like the following: Attached Serial Devices |-- USB Serial Device (COM12) | |-- COM12 9600 8N1 | |-- COM12 9600 7E1 | |-- COM12 19200 8N1 | `-- COM12 19200 7E1 `-- USB-SERIAL CH340 (COM34) |-- COM34 9600 8N1 |-- COM34 9600 7E1 |-- COM34 19200 8N1 `-- COM34 19200 7E1 Installation of PowerShell for Mac OS. Setting the exection policy of PowerShell to Remote Signed for Windows. This field must contain comma-separated list of serial port speeds in numeric format. This field must contain comma-separated list of serial port framing standards (8N1, 7E1, etc) in alphanumeric format, and each entry must be in double quotes.
+ Attached Serial Devices Dynamic Folder
+
+ Requirements
+
+ Custom Properties
+
+ Port Speeds
+
+
+
+ Frame Settings
+
+
+
This script utilizes PowerShell to generate a list of available serial devices, along with RTS Custom Properties defining speeds and framing settings, to generate a set of Terminal connections for each combination of port/speed/framing.
The resulting folder structure will look something like the following:
Attached Serial Devices
|-- USB Serial Device (COM12)
| |-- COM12 9600 8N1
| |-- COM12 9600 7E1
| |-- COM12 19200 8N1
| `-- COM12 19200 7E1
`-- USB-SERIAL CH340 (COM34)
|-- COM34 9600 8N1
|-- COM34 9600 7E1
|-- COM34 19200 8N1
`-- COM34 19200 7E1
This solution only works under Windows due to its use of WMI to identify available COM ports.
This field must contain comma-separated list of serial port speeds in numeric format.
This field must contain comma-separated list of serial port framing standards (8N1, 7E1, etc) in alphanumeric format, and each entry must be in double quotes.
\r\n\t\t\r\n\r\n","CustomProperties":[{"Name":"Port Speeds","Type":"Text","Value":"9600,19200,115200"},{"Name":"Frame Settings","Type":"Text","Value":"\"8N1\",\"7E1\""}],"ScriptInterpreter":"powershell","DynamicCredentialScriptInterpreter":"json","Script":"$ErrorActionPreference = \"Stop\"\r\n$comPortSpeeds = @($CustomProperty.PortSpeeds$)\r\n$comPortFrameSettings = @($CustomProperty.FrameSettings$)\r\n# Collect a list of avilable serial ports from WMI. See here for discussion: https://stackoverflow.com/questions/19840811/list-of-serialports-queried-using-wmi-differs-from-devicemanager\r\n$comPorts = Get-WmiObject -query 'SELECT * FROM Win32_PnPEntity WHERE ClassGuid=\"{4d36e978-e325-11ce-bfc1-08002be10318}\"'\r\n$folders = @()\r\nForEach ($comPort in $comPorts) {\r\n $connections = @()\r\n $comPortCaption = $comPort.Caption;\r\n if ($comPortCaption -match '.*\\((COM\\d+)\\)') {\r\n $comPortDevice = $Matches[1]\r\n }\r\n else {\r\n continue\r\n }\r\n ForEach ($comPortSpeed in $comPortSpeeds) {\r\n ForEach ($comPortFrameSetting in $comPortFrameSettings) {\r\n if ($comPortFrameSetting -match '^(\\d)([NOEMSnoems])(\\d)$') {\r\n [int]$comPortDataBits = $Matches[1]\r\n $comPortParityAlpha = $Matches[2].ToUpper()\r\n [int]$comPortStopBits = $Matches[3]\r\n }\r\n else {\r\n continue\r\n }\r\n if ($comPortParityAlpha -eq \"N\") {\r\n [int]$comPortParity = \"0\"\r\n }\r\n elseif ($comPortParityAlpha -eq \"O\") {\r\n [int]$comPortParity = \"1\"\r\n }\r\n elseif ($comPortParityAlpha -eq \"E\") {\r\n [int]$comPortParity = \"2\"\r\n }\r\n elseif ($comPortParityAlpha -eq \"M\") {\r\n [int]$comPortParity = \"3\"\r\n }\r\n elseif ($comPortParityAlpha -eq \"S\") {\r\n [int]$comPortParity = \"4\"\r\n }\r\n else {\r\n continue\r\n }\r\n $connectionProperties = New-Object PSCustomObject -Property @{\r\n \"BaudRate\" = $comPortSpeed;\r\n \"DataBits\" = $comPortDataBits;\r\n \"Parity\" = $comPortParity;\r\n \"StopBits\" = $comPortStopBits;\r\n }\r\n $connection = New-Object PSCustomObject -Property @{\r\n \"Type\" = \"TerminalConnection\";\r\n \"TerminalConnectionType\" = \"SerialPort\";\r\n \"Name\" = \"$comPortDevice $comPortSpeed $comPortFrameSetting\";\r\n \"SerialPortName\" = $comPortDevice;\r\n \"Properties\" = $connectionProperties;\r\n }\r\n $connections += $connection\r\n }\r\n }\r\n $folder = New-Object PSCustomObject -Property @{\r\n \"Type\" = \"Folder\";\r\n \"Name\" = $comPortCaption;\r\n \"Objects\" = $connections;\r\n }\r\n $folders += $folder\r\n}\r\n@{ Objects = $folders } | ConvertTo-Json -Depth 5"}]} \ No newline at end of file