Detecting the Display Model using a Custom Field

Use a FileWave Custom Field to store the model of display connected to a Mac or Windows system. 

FileWave 13.1.0+

  1. Download the following Custom Field export.
  2. Import the downloaded file into "FileWave Admin>Assistants>Custom Fields>Edit Custom Fields>Import".
  3. Save changes within Custom Fields dialog.
  4. Associate Custom Field with desired Windows devices via "right-click>Edit Custom Field(s) Associations" or check the "Assigned to all devices" checkbox when editing the Custom Field.
    1. A Smart Group is very helpful to quickly associate Custom Field

FileWave 12.7.0 - 13.0.3

  1. Create new Custom Field via "FileWave Admin>Assistants>Custom Fields>Edit Custom Fields>[+]".
  2. Change the Custom Fields to the following:
    1. Name: Display Model
    2. Internal name: display_model
    3. Description: [optional]
    4. Provided By: Client Script
    5. Data Type: String
    6. Use default value: Pending...
    7. Client Script>Windows: PowerShell



  3. Copy/paste the following script into the scripting box under the Windows section:
    Display Model
    $MonitorList = Get-WmiObject -Class WmiMonitorID -Namespace "ROOT\WMI"
    $MonitorOutput = @()
     
    foreach ($monitor in $MonitorList) {
    $mon = @{}
    $manufacturer = $null
    $name = $null
     
    foreach($ch in $monitor.ManufacturerName) {
    if($ch -ne '00') {
    $manufacturer += [char]$ch
    }
    }
     
    foreach($ch in $monitor.UserFriendlyName) {
    if($ch -ne '00') {
    $name += [char]$ch
    }
    }
    $mon = $manufacturer + " " + $name
    $MonitorOutput += $mon
    }
    $MonitorOutput=$MonitorOutput -join ', '
    $MonitorOutput
    exit 0
  4. Copy/paste the following script into the scripting box under the macOS section:

    Display Model
    #!/bin/bash
    DisplayModel=`system_profiler SPDisplaysDataType | grep "Resolution:" -B1 | awk -v n=3 'NR%n==1' | sed "s/^[ \t]*//" | sed 's/:/,/g' | tr '\n' ' '`
    echo ${DisplayModel}
    exit 0
  5. Save changes within Custom Fields dialog.
  6. Associate Custom Field with desired devices via "right-click>Edit Custom Field(s) Associations" or check the "Assigned to all devices" checkbox when editing the Custom Field.
    1. A Smart Group can be helpful to quickly associate Custom Field

Results


There is no content with the specified labels