diff --git a/lib/graphics.js b/lib/graphics.js
index 94112d6..2a67498 100644
--- a/lib/graphics.js
+++ b/lib/graphics.js
@@ -722,9 +722,9 @@ function graphics(callback) {
if (ssections[i].trim() !== '') {
ssections[i] = 'BitsPerPixel ' + ssections[i];
msections[i] = 'Active ' + msections[i];
- // tsections can be empty on earlier versions of powershell (<=2.0). Tag connection type as UNKNOWN
- // if this information is missing
- if (tsections.length === 0) {
+ // tsections can be empty OR undefined on earlier versions of powershell (<=2.0)
+ // Tag connection type as UNKNOWN by default if this information is missing
+ if (tsections.length === 0 || tsections[i] === undefined) {
tsections[i] = 'Unknown';
}
let linesScreen = ssections[i].split(os.EOL);